Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 683
Default How do I set up a file to automatically save on exit?

I have created a file that several users will be accessing with varying
computer skill level. I want to be sure that the file saves automatically
when they close the file out rather than having to answer "yes" to the "Do
you want to save this file?" question. Can this be done?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,071
Default How do I set up a file to automatically save on exit?

Brian
Yes, that can be done with VBA programming. The following macro will
save the file whenever a close command is issued by the user, regardless of
whether the file has already been saved. This is a Workbook event macro and
must be placed in the workbook module. Post back and provide your Excel
version if you need more help with this.. HTH Otto
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.DisplayAlerts = False
ThisWorkbook.Save
ThisWorkbook.Saved = True
Application.DisplayAlerts = True
End Sub

"Brian" wrote in message
...
I have created a file that several users will be accessing with varying
computer skill level. I want to be sure that the file saves automatically
when they close the file out rather than having to answer "yes" to the "Do
you want to save this file?" question. Can this be done?


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
How do I have Excel automatically save a file periodically? [email protected] Excel Discussion (Misc queries) 3 October 20th 09 09:47 PM
excel save file upon exit Sarah Excel Discussion (Misc queries) 2 February 9th 07 06:42 PM
Automatically save a file in another directory MarkT Excel Discussion (Misc queries) 4 September 18th 06 02:53 PM
Automatically save file based on cell value Craig Excel Discussion (Misc queries) 0 February 27th 05 10:01 PM
Save & Exit Anthony Excel Worksheet Functions 1 February 12th 05 05:23 PM


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