LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default Why Prompted To Save Again?

Has anyone else encountered this? Why does this happen?
What can I do so that I can still delete the sheets that I
need to and not have to save twice?

Well, after a bit of testing, it seems I have determined
why - when the user goes to close the Excel file produced
by my marco - that the user is prompted to save "changes"
again after the macro had already used SaveAs to get the
user to save the file before the macro finished running.

These inexplicable "changes" do not need to be saved again
after the macro is done, and the user is closing the Excel
file; when I get rid of a series of delete statements
which occur near the end of the macro but before the
SaveAs statement. The lines look like the following:

Application.DisplayAlerts = False
Worksheets(2).Delete
Worksheets(3).Delete
Worksheets(4).Delete
Application.DisplayAlerts = True

It's as if the deleting of these sheets does not finish
before the SaveAs has finished or even the macro has
finished.

I have even tried peppering the code after the SaveAs line
with a few Save statements. I have also employed the
suggestion received from my last post to include the
following line:

ActiveWorkbook.Saved = True

But this does not seem the be the solution either. Please
let me know you thoughts on this. Thank you.
 
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
Prompted to save changes after macro save - why? Izar Arcturus Excel Programming 2 December 10th 03 09:27 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 09:56 AM.

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

About Us

"It's about Microsoft Excel"