Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Prompted to save changes after macro save - why?
At the end of the marco I have written for Excel, I have
included code that allows the user to save the file that has been created. But, after the user saves the file, the macro ends, and the user goes to close the file that has just been saved; a dialog box with an alert message appears asking if you want to save the changes to the file. If the user does not save the changes to the file(a second save) then when the file is opened later Excel crashes. This does not happen in all the macros that I have written and I have been trying to figure out why it happens with some but not others. Does anyone know why this happens? How can I write my code so that the save executed by the macro is enough? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Prompted to save changes after macro save - why?
How can I write my code so that the save executed by the
macro is enough? try setting the saved property to true. activeworkbook.saved = true |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
More Help Please - Prompted to save changes after macro save - why?
Thanks for the suggestion. I put the following line after
the code that gets the user to save their file: ActiveWorkbook.Saved = True But the problem persists. A dialog box with an alert asking if I want to save the changes to the file still appears as if the file had not been just saved. Could there be some execution of code that has not finished or something? Could there be some "changes" still occurring to the file after the macro saves it? Your thoughts on this are appreciated. -----Original Message----- How can I write my code so that the save executed by the macro is enough? try setting the saved property to true. activeworkbook.saved = true . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
No longer prompted to Save | Excel Discussion (Misc queries) | |||
Prompted to save | Excel Discussion (Misc queries) | |||
Why am I prompted to save a file when nothing has changed? | Excel Discussion (Misc queries) | |||
Save as CSV without being prompted | Excel Programming | |||
Save as CSV without being prompted | Excel Programming |