Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default 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   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
No longer prompted to Save Bob Excel Discussion (Misc queries) 2 May 3rd 07 01:52 AM
Prompted to save hetherjw Excel Discussion (Misc queries) 5 October 27th 05 06:22 PM
Why am I prompted to save a file when nothing has changed? SimonD Excel Discussion (Misc queries) 2 April 29th 05 02:21 PM
Save as CSV without being prompted Tom Ogilvy Excel Programming 0 July 18th 03 12:05 AM
Save as CSV without being prompted Randall Arnold[_2_] Excel Programming 0 July 17th 03 10:36 PM


All times are GMT +1. The time now is 08:55 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"