A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Automatically save a copy of worksheet from C: to Network Drive



 
 
Thread Tools Display Modes
  #1  
Old May 3rd, 2005, 06:05 PM
doosbug
external usenet poster
 
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  
Old May 3rd, 2005, 06:23 PM
Gord Dibben
external usenet poster
 
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?


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Open and Automatically save an image Dave M Using Forms 3 April 19th, 2005 11:12 PM
how do I make a copy of a worksheet and retain formulas but not data FireBrick Setting up and Configuration 2 December 29th, 2004 07:33 PM
Copy text automatically to another worksheet sally General Discussion 1 November 8th, 2004 01:27 PM
COPY AND PASTE ROW IN PROTECTED WORKSHEET Giloboy General Discussion 1 September 16th, 2004 12:27 AM
i need to be able to auto save a copy of email on c drive Paul Salmon General Discussion 1 September 10th, 2004 04:11 PM


All times are GMT +1. The time now is 08:12 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.