Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 18
Default Saving a workbook in two places.

I am seeking to save a workbook in two places, having the second save
automatic.
In detail: I'd like to be able to specify the save location of the Save
request, but I'd like to automatically save a copy (or a backup) in another
folder on another drive... is this possible?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,593
Default Saving a workbook in two places.

Look at SaveCopyAs in VBA help.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Luke Slotwinski" wrote in
message ...
I am seeking to save a workbook in two places, having the second save
automatic.
In detail: I'd like to be able to specify the save location of the Save
request, but I'd like to automatically save a copy (or a backup) in

another
folder on another drive... is this possible?



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Saving a workbook in two places.

Luke

Sub BUandSave()
'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:\yourfolderf\" & _
ActiveWorkbook.Name
ActiveWorkbook.Save
Application.DisplayAlerts = True
End Sub


Gord Dibben MS Excel MVP

On Fri, 22 Dec 2006 21:55:00 -0800, Luke Slotwinski
wrote:

I am seeking to save a workbook in two places, having the second save
automatic.
In detail: I'd like to be able to specify the save location of the Save
request, but I'd like to automatically save a copy (or a backup) in another
folder on another drive... is this possible?


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 18
Default Saving a workbook in two places.

Thank you for your help... That did the trick :)
Luke

"Gord Dibben" wrote:

Luke

Sub BUandSave()
'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:\yourfolderf\" & _
ActiveWorkbook.Name
ActiveWorkbook.Save
Application.DisplayAlerts = True
End Sub


Gord Dibben MS Excel MVP

On Fri, 22 Dec 2006 21:55:00 -0800, Luke Slotwinski
wrote:

I am seeking to save a workbook in two places, having the second save
automatic.
In detail: I'd like to be able to specify the save location of the Save
request, but I'd like to automatically save a copy (or a backup) in another
folder on another drive... is this possible?



  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default Saving a workbook in two places.

Gord

I see that this worked for the other user, however I am not familiar with
VB. So if you could give me some more direction on where this code should go.

Thanks

"Gord Dibben" wrote:

Luke

Sub BUandSave()
'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:\yourfolderf\" & _
ActiveWorkbook.Name
ActiveWorkbook.Save
Application.DisplayAlerts = True
End Sub


Gord Dibben MS Excel MVP

On Fri, 22 Dec 2006 21:55:00 -0800, Luke Slotwinski
wrote:

I am seeking to save a workbook in two places, having the second save
automatic.
In detail: I'd like to be able to specify the save location of the Save
request, but I'd like to automatically save a copy (or a backup) in another
folder on another drive... is this possible?





  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Saving a workbook in two places.

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 or edit the macro by going to ToolMacroMacros.

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


Gord

On Thu, 24 May 2007 14:37:23 -0700, jstro01
wrote:

Gord

I see that this worked for the other user, however I am not familiar with
VB. So if you could give me some more direction on where this code should go.

Thanks

"Gord Dibben" wrote:

Luke

Sub BUandSave()
'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:\yourfolderf\" & _
ActiveWorkbook.Name
ActiveWorkbook.Save
Application.DisplayAlerts = True
End Sub


Gord Dibben MS Excel MVP

On Fri, 22 Dec 2006 21:55:00 -0800, Luke Slotwinski
wrote:

I am seeking to save a workbook in two places, having the second save
automatic.
In detail: I'd like to be able to specify the save location of the Save
request, but I'd like to automatically save a copy (or a backup) in another
folder on another drive... is this possible?




  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default Saving a workbook in two places.

Thanks, this is the only line of code I can't get to work correctly.

ActiveWorkbook.SaveCopyAs FileName:="C:\My Documents\Doug Berke" & ???

I'm not sure what goes where the question marks are.

"Gord Dibben" wrote:

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 or edit the macro by going to ToolMacroMacros.

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


Gord

On Thu, 24 May 2007 14:37:23 -0700, jstro01
wrote:

Gord

I see that this worked for the other user, however I am not familiar with
VB. So if you could give me some more direction on where this code should go.

Thanks

"Gord Dibben" wrote:

Luke

Sub BUandSave()
'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:\yourfolderf\" & _
ActiveWorkbook.Name
ActiveWorkbook.Save
Application.DisplayAlerts = True
End Sub


Gord Dibben MS Excel MVP

On Fri, 22 Dec 2006 21:55:00 -0800, Luke Slotwinski
wrote:

I am seeking to save a workbook in two places, having the second save
automatic.
In detail: I'd like to be able to specify the save location of the Save
request, but I'd like to automatically save a copy (or a backup) in another
folder on another drive... is this possible?




  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Saving a workbook in two places.

ActiveWorkbook.SaveCopyAs FileName:="C:\My Documents\Doug Berke\" _
& ActiveWorkbook.Name

Will save a copy with the same name to the Doug Berke folder.

Do you want to specify a name to save as?

Sub BUandSave2()
'Saves the current file to a backup folder and the default folder
'Note that any backup is overwritten if myname is duplicated
Dim myname As String
myname = InputBox("enter a name")
Application.DisplayAlerts = False
ActiveWorkbook.SaveCopyAs Filename:="C:\My Documents\Doug Berke\" & _
myname & ".xls"
ActiveWorkbook.Save
Application.DisplayAlerts = True
End Sub


Gord


On Fri, 25 May 2007 05:40:01 -0700, jstro01
wrote:

Thanks, this is the only line of code I can't get to work correctly.

ActiveWorkbook.SaveCopyAs FileName:="C:\My Documents\Doug Berke" & ???

I'm not sure what goes where the question marks are.

"Gord Dibben" wrote:

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 or edit the macro by going to ToolMacroMacros.

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


Gord

On Thu, 24 May 2007 14:37:23 -0700, jstro01
wrote:

Gord

I see that this worked for the other user, however I am not familiar with
VB. So if you could give me some more direction on where this code should go.

Thanks

"Gord Dibben" wrote:

Luke

Sub BUandSave()
'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:\yourfolderf\" & _
ActiveWorkbook.Name
ActiveWorkbook.Save
Application.DisplayAlerts = True
End Sub


Gord Dibben MS Excel MVP

On Fri, 22 Dec 2006 21:55:00 -0800, Luke Slotwinski
wrote:

I am seeking to save a workbook in two places, having the second save
automatic.
In detail: I'd like to be able to specify the save location of the Save
request, but I'd like to automatically save a copy (or a backup) in another
folder on another drive... is this possible?





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
LINKEDRANGE function - a complement to the PULL function (for getting values from a closed workbook) [email protected] Excel Worksheet Functions 0 September 5th 06 03:44 PM
Saving an entire workbook as a PDF using VBSCript Who be dat? Excel Discussion (Misc queries) 5 March 20th 06 07:09 PM
Saving a workbook in Excel 2003 serge Excel Discussion (Misc queries) 0 February 9th 06 04:26 PM
Unprotect Workbook Kent Excel Discussion (Misc queries) 1 February 4th 05 01:07 AM
Weekly Email one sheet in workbook not saving contacts Brian Mashburn Excel Worksheet Functions 0 January 27th 05 07:19 PM


All times are GMT +1. The time now is 07:23 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"