Actuarial Outpost
 
Go Back   Actuarial Outpost > Actuarial Discussion Forum > Software & Technology
FlashChat Actuarial Discussion Preliminary Exams CAS/SOA Exams Cyberchat Around the World Suggestions

D.W. Simpson and Company -- Actuary Salary Surveys
Pension, Life, Health and Investment Actuarial Jobs

Property and Casualty Actuarial Jobs   Registration Form


Reply
 
Thread Tools Display Modes
  #1  
Old 11-25-2008, 11:41 AM
nittanylions's Avatar
nittanylions nittanylions is offline
Member
CAS
 
Join Date: Oct 2006
Studying for CAS 5
Posts: 275
Default Excel - "Yes to All" when saving changes upon close

Hi all,

I'm having issues when closing multiple files. I click the red X in the upper right hand corner, and choose "Yes to All" when the dialog box asks me if I want to save any changes. The problem I have is that when I choose "Yes to All", it seems to close an add-in that I use before saving and therefore all the files are saved with #VALUE references everywhere there are cells that rely on the add-in (which is most of the cells in every file). I never had this issue before and I'm not sure why it started now.

Any suggestions on how to get around this?

Also, this doesn't happen when closing an individual file. Only happens when using "Yes to All" save option.
__________________
fight for peace and happiness and never give up

Last edited by nittanylions; 11-25-2008 at 11:46 AM..
Reply With Quote
  #2  
Old 11-25-2008, 12:18 PM
dumples dumples is offline
Member
 
Join Date: Sep 2003
Posts: 1,073
Default

Add a routine to your add-in workbook to save all open workbooks and then close itself.

something short will probably do

Code:
 
Sub closeAllOpenBooks()
dim wb as workbook
for each wb in application.workbooks
 if wb.name<> thisworkbook.name then wb.close(true)
next wb
thisworkbook.close(true)
end sub
Note, I don't generally use add-ins, so I am not 100% that the thisworkbook.close line will work or is necessary.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


All times are GMT -4. The time now is 07:39 PM.


Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
*PLEASE NOTE: Posts are not checked for accuracy, and do not
represent the views of the Actuarial Outpost or its sponsors.
Page generated in 0.11649 seconds with 7 queries