Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...mming/200508/1 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 "Mark C via OfficeKB.com" wrote: 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 -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...mming/200508/1 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
It works perfectly. That is exactly what I am trying to do. Thank you very
much. Rowan wrote: 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 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 -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...mming/200508/1 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You're welcome!
"Mark C via OfficeKB.com" wrote: It works perfectly. That is exactly what I am trying to do. Thank you very much. Rowan wrote: 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 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 -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...mming/200508/1 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Problems saving a worksheet with links to a New Location | Excel Worksheet Functions | |||
VBA for saving a file to a specific location | Excel Programming | |||
problem saving workbook to network location | Excel Discussion (Misc queries) | |||
Saving in a location | Excel Programming | |||
Saving a TXT file keeping its current location | Excel Programming |