#1
|
|||
|
|||
VBA Code to force 'Save As'
I have a 2007 excel .xls file I use as a time sheet record for my employees. They open the file, fill in their hours worked for the week and save to a new location (so they don't overwrite the .xls) At this point, the saving to the new location is done manually by the employee using the 'Save As' button.
The problem I am having is, they sometimes forget to 'Save As' and click 'Save' instead, therefore overwriting my original .xls. The solution I want to integrate is to write some VBA code to prompt the user to always 'Save As' so from the original .xls so they don't overwrite. The logic I want is:
Thanks, Mike |
#2
|
||||
|
||||
Hi Mike,
If you save the timesheet 'template' as an Excel template, your employees will get a new (non-template) file each time they start a timesheet for a new period. They'll then be prompted for the filename and, even if they don't give one, your template will not be over-written. The file-creation process is a little more convoluted (File|New|My Templates), but that's the price they pay. One alternative is to set your file's read-only attribute under Windows Explorer. That way, Windows won't allow them to modify the file. Another is to change the file's permissions, so that only you can edit the file, but they can make copies, etc.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to force tabs to be consistent | PatrickYork | Word | 1 | 05-01-2012 07:21 AM |
Code to stop as "save as" if the mail merge has not been done | tonywatsonmail | Mail Merge | 4 | 04-27-2012 01:57 AM |
Force a page break | Emaleth9999 | Mail Merge | 1 | 02-09-2012 02:36 AM |
Force page setup override | jgaffney@hbs.net | Word | 1 | 12-16-2011 06:45 AM |
code to save / rename / send attachments | unit213 | Outlook | 1 | 09-26-2007 08:15 PM |