back up in two locations

mikieprojects48

New Member
Joined
Jun 5, 2011
Messages
9
I'm working on a macro that will back up my file on a hard drive; I have a macro for that. But now I'm trying to refine it to back up my file in two different locations and I'm having problems with this any help would be appreciated. This is what I have to save to one hard drive.<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>
<o:p> </o:p>Option Explicit
Private Sub WORKBOOK_BEFORECLOSE(CANCEL As Boolean)<o:p></o:p>
Dim MSG As String<o:p></o:p>
Dim ANS As Integer<o:p></o:p>
Dim FNAME As String<o:p></o:p>
<o:p> </o:p>MSG = "WOULD YOU LIKE TO BACKUP THIS FFIILLEE?"<o:p></o:p>
ANS = MsgBox(MSG, vbYesNo)<o:p></o:p>
<o:p> </o:p>FNAME = "F:\MACROS\" & ThisWorkbook.Name<o:p></o:p>
ThisWorkbook.SaveAs FNAME<o:p></o:p>
<o:p> </o:p>End Sub<o:p></o:p>
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.

Forum statistics

Threads
1,224,589
Messages
6,179,744
Members
452,940
Latest member
rootytrip

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top