Macro to Save without the Save Message

G

Guest

I am writing a macro that will ultimately close the workbook. However, I want
to save changes but I do not want the user prompted with the Do You Want To
Save Changes message. I simply want the workbook to save and close. I know
about DisplayAlerts -- but it appears that setting this to false stops the
Save message but does not keep the changes. Can anybody help?

Thanks so much.
Ellen
 
G

Guest

Try
application.save
application.quit (or application.close, depending upon whether you want to
close excel completely or not).

hope this helps,
-Chad
 
G

Guest

Save the workbook first by calling the Save or SaveAs method. Then you can
immediately close it and you won't get the prompt.
 
G

Guest

I feel so stupid. I actually figured this out just before I saw everyone's
input. THANKS EVERYBODY!
 

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

Similar Threads


Top