Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Always Create Backup-Specifiying Path

Status
Not open for further replies.

annedaugherty

IS-IT--Management
Joined
Nov 5, 2002
Messages
1
Location
US
I am trying to save a backup file whenever I close my Excel workbook. This I can do with no problem. I wish to save a copy of it to a different directory on the network.

Is there a way to do this?
Thank you for your help
 
Add an eventhandler to your ThisWorkbook code module:

sub Workbook_BeforeClose()
application.displayalerts=false 'to automatically overwrite
thisworkbook.saveas SaveFolder & "\" & thisworkbook.name
application.displayalerts=true
end sub

Rob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top