Prompt for saving a saved workbook

M

Mats Samuelsson

Suddenly when quitting my application and running the
save & close procedure Excel asks if I want to save the workbook at the
Application.quit command, spite it was already done?
Anyone knows what is causing this?
Dim WB as Workbook
For Each WB In Application.Workbooks
WB.Save
Next WB
Application.Quit
 
T

The Code Cage Team

If you must quit the application rather than closing the workbooks,
try:

Dim WB as Workbook
For Each WB In Application.Workbooks
WB.Save
WB.Saved =True
Next WB
Application.Quit


--
The Code Cage Team

Regards,
The Code Cage Team
http://www.thecodecage.com
 
N

Neptune Dinosaur

Is there perhaps something in your "Workbook_BeforeClose" procedure that is
making a change and therefore triggering the Save/Not Save question? Or
maybe a Worksheet event making a change?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top