Saving Excel in more than one location

  • Thread starter Thread starter Mark C via OfficeKB.com
  • Start date Start date
M

Mark C via OfficeKB.com

I have found a macro for word that will do the job and I tried to put it into
excel. But it comes up with an error 405. I was wondering if anyone knew of
a macro that will allow you to save a file to two different locations. And
that it will prompt you for a save location each time. What i am trying to
do is kep a copy on my computer C drive and a copy on a network server, we
have problems with our server. Please help
 
How about:

Sub SaveAs()
Dim flName As String
Dim fullName As Variant
Dim filter As String
flName = "SaveName"
filter = "Excel Files (*.xls), *.xls"
fullName = Application.GetSaveAsFilename(flName, filter, , "Save copy 1")
If fullName <> False Then
Application.DisplayAlerts = False
ThisWorkbook.SaveAs fullName
Application.DisplayAlerts = True
End If
fullName = Empty
fullName = Application.GetSaveAsFilename(flName, filter, , "Save copy 2")
If fullName <> False Then
Application.DisplayAlerts = False
ThisWorkbook.SaveAs fullName
Application.DisplayAlerts = True
End If
End Sub

Hope this helps
Rowan
 
It works perfectly. That is exactly what I am trying to do. Thank you very
much.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top