Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35
Default Macro to Save without the Save Message

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
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 273
Default Macro to Save without the Save Message

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

hope this helps,
-Chad

"Ellen G" wrote:

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

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 857
Default Macro to Save without the Save Message

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


"Ellen G" wrote:

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

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,344
Default Macro to Save without the Save Message

Hi Ellen

ActiveWorkbook.Close SaveChanges:=TRUE


--
Thanks,
Shane Devenshire


"Ellen G" wrote:

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

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35
Default Macro to Save without the Save Message

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

"Chad" wrote:

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

hope this helps,
-Chad

"Ellen G" wrote:

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

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
Display message during save operation Excelerate-nl Excel Discussion (Misc queries) 4 December 8th 05 07:27 PM
Formula Causing a Save Error Message Mr Mike Excel Worksheet Functions 2 September 1st 05 06:01 PM
why do I get a message that says save a copy or overwrite changes Jennifer Excel Discussion (Misc queries) 1 August 31st 05 12:58 AM
When I save a file I consistently get a message about saving a co. cynspin Excel Discussion (Misc queries) 2 February 1st 05 10:30 PM
When I try to save a workbook, I get the message "document has no. Accountant Excel Discussion (Misc queries) 1 January 12th 05 01:39 PM


All times are GMT +1. The time now is 08:57 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"