Macro - save as in 2 different locations

L

Legacy 53668

Guest
I would like to save a file with the name being the text located in A1 in two different file locations. I can do the first part of saving as the text in A1, but how can I tell it to save that file to different locations?
 

Some videos you may like

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.

shajueasow

Well-known Member
Joined
Oct 7, 2004
Messages
1,926
Hi,
Try recording macro to do this and make changes in the code if needed. This was what I got while doing so.

Sub savetwice()
Application.DisplayAlerts = False 'to disable alert messages.
ActiveWorkbook.SaveAs Filename:= _
"C:\Documents and Settings\Shaju\My Documents\Book1todelete).xls", FileFormat _
:=xlNormal, Password:="", WriteResPassword:="", ReadOnlyRecommended:= _
False, CreateBackup:=False
ChDir "C:\Documents and Settings\Shaju\Desktop"
ActiveWorkbook.SaveAs Filename:= _
"C:\Documents and Settings\Shaju\Desktop\Book1todelete).xls", FileFormat:= _
xlNormal, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False _
, CreateBackup:=False
Application.DisplayAlerts = True 'to enable alert messages
End Sub
 

Watch MrExcel Video

Forum statistics

Threads
1,118,673
Messages
5,573,588
Members
412,537
Latest member
Mohamed_5966
Top