Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Save= False Question
Hi:
I have a macro that includes the following: ActiveWorkbook.Close Save = False I had anticipated that this wold result in the spreadsheet being closed but NOT being saved. However, it appears that its being saved as its being closed. Can someone suggest a reason, and more important, a way to prevent it being saved! Thanks John Baker |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Save= False Question
Hi John,
ActiveWorkbook.Close Save = False I had anticipated that this wold result in the spreadsheet being closed but NOT being saved. However, it appears that its being saved as its being closed. Can someone suggest a reason, and more important, a way to prevent it being saved! The proper syntax is: ActiveWorkbook.Close SaveChanges:= False Regards, Jan Karel Pieterse Excel MVP www.jkp-ads.com |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Save= False Question
John
ActiveWorkbook.Close false works for me or ActiveWorkbook.Close savechanges:=false you could also try adding ActiveWorkbook.saved = true before you close to clear the 'needs saving' flag I also open stuff read only where possible Cheers Simon -----Original Message----- Hi: I have a macro that includes the following: ActiveWorkbook.Close Save = False I had anticipated that this wold result in the spreadsheet being closed but NOT being saved. However, it appears that its being saved as its being closed. Can someone suggest a reason, and more important, a way to prevent it being saved! Thanks John Baker . |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Save= False Question
Jan:
The macro is as follows now and it STILL saves the spreadsheet! Any suggestions? : Sub InstallNo() ' ' InstallNo Macro ' Macro recorded 07/02/2004 by John H Baker ' Msgbox ("You have elected not to install the new version of the spreadsheet. If you change your mind you may reopen this sheet and restart the installation process later.") ActiveWorkbook.Close SaveChanges = False ' End Sub Jan Karel Pieterse wrote: Hi John, ActiveWorkbook.Close Save = False I had anticipated that this wold result in the spreadsheet being closed but NOT being saved. However, it appears that its being saved as its being closed. Can someone suggest a reason, and more important, a way to prevent it being saved! The proper syntax is: ActiveWorkbook.Close SaveChanges:= False Regards, Jan Karel Pieterse Excel MVP www.jkp-ads.com |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Save= False Question
Sorry I found the mistake. I had not put a : before the = sign! Its unusual to require that..I have used just = in many other situations and it works just fine. Best John John Baker wrote: Jan: The macro is as follows now and it STILL saves the spreadsheet! Any suggestions? : Sub InstallNo() ' ' InstallNo Macro ' Macro recorded 07/02/2004 by John H Baker ' Msgbox ("You have elected not to install the new version of the spreadsheet. If you change your mind you may reopen this sheet and restart the installation process later.") ActiveWorkbook.Close SaveChanges = False ' End Sub Jan Karel Pieterse wrote: Hi John, ActiveWorkbook.Close Save = False I had anticipated that this wold result in the spreadsheet being closed but NOT being saved. However, it appears that its being saved as its being closed. Can someone suggest a reason, and more important, a way to prevent it being saved! The proper syntax is: ActiveWorkbook.Close SaveChanges:= False Regards, Jan Karel Pieterse Excel MVP www.jkp-ads.com |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Error and Save as question | Excel Discussion (Misc queries) | |||
What's the best way to toggle between true and false in Excel? Hiall, My excel work involves a lot of toggling between true and false (booleantypes) ... and it's very repetitive... Is there a way to select a bunch ofcells, and press a key short-cu | Excel Discussion (Misc queries) | |||
Another Save Question | Excel Worksheet Functions | |||
True Or False, no matter what... it still displays the false statement | Excel Programming | |||
A save question: | Excel Programming |