Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
doosbug
 
Posts: n/a
Default Automatically save a copy of worksheet from C: to Network Drive

I have a spreadsheet that I work on my C: drive that I need to have a copy
automatically saved (undated everytime I make changes) on a network drive so
my boss can access it when she needs to review it. Can I do this?
  #2   Report Post  
Gord Dibben
 
Posts: n/a
Default

doos

VBA macro run from a button or shortcut key combo...

Sub BUandSave2()
'Saves the current file to a backup folder and the default folder
'Note that any backup is overwritten
Application.DisplayAlerts = False
ActiveWorkbook.SaveCopyAs FileName:="E:\GordStuff\Backup\" & _
ActiveWorkbook.Name
ActiveWorkbook.Save
Application.DisplayAlerts = True
End Sub

You could alternatively place this code in a BeforeSave routine in This
Workbook module.

Right-click on the Excel logo left of "File" on menu and select "View Code"
then paste into that module.

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
Application.DisplayAlerts = False
ActiveWorkbook.SaveCopyAs FileName:="E:\GordStuff\Backup\" & _
ActiveWorkbook.Name
ActiveWorkbook.Save
Application.DisplayAlerts = True
End Sub

Edit the path in the code to your network path.


Gord Dibben Excel MVP


On Tue, 3 May 2005 10:05:05 -0700, "doosbug"
wrote:

I have a spreadsheet that I work on my C: drive that I need to have a copy
automatically saved (undated everytime I make changes) on a network drive so
my boss can access it when she needs to review it. Can I do this?


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 can I copy an .xls worksheet to another worksheet bobt Excel Worksheet Functions 3 March 13th 05 06:50 AM
I can't get a worksheet to copy onto the workbook KCoyne Excel Worksheet Functions 3 March 12th 05 04:09 PM
Automatically save file based on cell value Craig Excel Discussion (Misc queries) 0 February 27th 05 10:01 PM
Excel shifts to wrong worksheet automatically Tom77 Excel Worksheet Functions 1 February 24th 05 08:10 PM
save comments to a worksheet IM_CRice Excel Worksheet Functions 5 January 7th 05 10:37 PM


All times are GMT +1. The time now is 03:33 PM.

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"