Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default I need a macro that saves a spreadsheet on two drive at once,

I need a way to save a spreadsheet on two different drives at once, (1 for
backup). Ideally this will be done with the minimum of moves, one button or
cloick would be nice.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,355
Default I need a macro that saves a spreadsheet on two drive at once,

I'm thinking you could put this in a Workbook_BeforeSave event. I've never
done it. You may want to ask in the Programming group.

"Chauncy_G" wrote:

I need a way to save a spreadsheet on two different drives at once, (1 for
backup). Ideally this will be done with the minimum of moves, one button or
cloick would be nice.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 430
Default I need a macro that saves a spreadsheet on two drive at once,

In the past I've just used 'record macro' to manually save to each location.
Then i either assign the macro to a button or make a macro short cut and use
that.

"Chauncy_G" wrote:

I need a way to save a spreadsheet on two different drives at once, (1 for
backup). Ideally this will be done with the minimum of moves, one button or
cloick would be nice.

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default I need a macro that saves a spreadsheet on two drive at once,

Chauncy

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:="C:\Gordstuff\" & _
ActiveWorkbook.Name
ActiveWorkbook.Save
Application.DisplayAlerts = True
End Sub

Adjust the C:\Gordsuff path.

If not familiar with VBA and macros, see David McRitchie's site for more on
"getting started".

http://www.mvps.org/dmcritchie/excel/getstarted.htm

In the meantime..........

First...create a backup copy of your original workbook.

To create a General Module, hit ALT + F11 to open the Visual Basic Editor.

Hit CRTL + R to open Project Explorer.

Find your workbook/project and select it.

Right-click and InsertModule. Paste the code in there. Save the
workbook and hit ALT + Q to return to your workbook.

Run the macro by going to ToolMacroMacros.

You can also assign this macro to a button or a shortcut key combo.

Or stick it in a BeforeSave event in Thisworkbook for no key strokes at all.

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



Gord Dibben MS Excel MVP

On Mon, 24 Jul 2006 09:57:02 -0700, Chauncy_G
wrote:

I need a way to save a spreadsheet on two different drives at once, (1 for
backup). Ideally this will be done with the minimum of moves, one button or
cloick would be nice.


Gord Dibben MS Excel MVP
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
link to combobox legepe Excel Discussion (Misc queries) 4 July 26th 06 04:45 PM
How do i create a macro that saves the filename that is equal to a cell in the sheet? Chukka Excel Discussion (Misc queries) 1 December 6th 05 04:19 PM
Macro not found when spreadsheet viewed in Internet Explorer? Ben Excel Discussion (Misc queries) 1 February 10th 05 07:31 PM
Spreadsheet print including macro buttons? gunga Excel Discussion (Misc queries) 4 February 10th 05 06:30 PM
Sample spreadsheet of using macro Isaac Excel Worksheet Functions 2 November 19th 04 02:22 AM


All times are GMT +1. The time now is 07:58 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"