Thread: [Solved] VBA Code to force 'Save As'
View Single Post
 
Old 05-11-2012, 08:41 AM
rossi45 rossi45 is offline Windows 7 64bit Office 2007
Novice
 
Join Date: May 2012
Posts: 2
rossi45 is on a distinguished road
Default 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:

  1. Employee opens file and enters data
  2. When they go to save from the .xls, I want a prompt to force the user to 'Save As' to a new location.
  3. If the user has already saved to a new location and they open up the new file in order to edit, then it would be ok to use the 'Save' button at that point.
I've struggled to find some code out there that will do this. If anyone can help, I would appreciate it!


Thanks,
Mike
Reply With Quote