Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 31
Default Automatically save workbook when exiting

Hi all,

I have created a workbook that records the user name, date and time the
workbook was opened in a hidden worksheet, but as it is updated it asks
the user whether to save the workbook of the changes or not before exiting.

I would like the workbook to automatically save ONLY the hidden
worksheet without offering an option to the user. If the user has
modified any other worksheets of the workbook then I would like to
follow the protocol of asking the user to save the complete workbook. At
all times, the hidden worksheet must be save without question every time
the workbook is exited.

Is this possible?

Thanx in advance

Maddoktor
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Automatically save workbook when exiting

Whenever the hidden worksheet is updated,save it using the code
activeworkbook.save
Also update the hidden sheet when the workbook is open

Else,use a text file to save changes

For more queries,post to
http://groups.google.co.in/group/answers-for-everything

  #3   Report Post  
Posted to microsoft.public.excel.programming
GS GS is offline
external usenet poster
 
Posts: 364
Default Automatically save workbook when exiting

Hi Maddoktor,

Since you record this information when the workbook is opened, I assume the
code is fired in the Workbook_Open event. To save the file after the hidden
sheet is updated, insert this line:

ThisWorkbook.Save

immediately after the code that enters the info.

Regards,
GS
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 31
Default Automatically save workbook when exiting

GS wrote:
Hi Maddoktor,

Since you record this information when the workbook is opened, I assume the
code is fired in the Workbook_Open event. To save the file after the hidden
sheet is updated, insert this line:

ThisWorkbook.Save

immediately after the code that enters the info.

Regards,
GS


Hey ... thanx it worked but I have one little problem. The user name and
date/time keeps being recorded in cells A1 and B1 and every time it
saves it overwrites the previous information. Would you happen to know
the coding so that when the information is first recorded in cells A1
and B1, before saving the active cells then become A2 and B2. Therefore,
the next time the workbook is opened, the information will be recorded
in A2 and B2.

Thanx again in advance.
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 disable save prompt when exiting a sheet? Copter32 Excel Discussion (Misc queries) 7 March 12th 08 04:25 PM
HOW DO YOU GET EXCEL TO ASK IF YOU WANT TO SAVE A FILE ON EXITING David Lambright Excel Discussion (Misc queries) 3 October 15th 05 07:46 AM
IS THERE A SETTING TO DISABLE SAVE ON EXITING? Leo Excel Discussion (Misc queries) 5 September 9th 05 03:07 PM
Exiting WorkBook Save event Richard Buttrey Excel Programming 3 July 29th 05 06:23 PM
Exiting Excel prompts for save MXH Excel Discussion (Misc queries) 3 February 22nd 05 08:31 PM


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