Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I would like to request a macro that can do the following tasks: 1. check to see if three specific network paths are available 2. save to all of the network paths that are available, without generating errors (or messages) for the paths that are not available Any ideas? Hopefully, someone already has written such a macro. As always, thanks very much for your assistance and suggestions Best regards, Joseph |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Untested since I'm not networked right now:
Sub SaveToAllPaths(strPath1 As String, strPath2 As String, strPath3 As String) On Error Resume Next With ThisWorkbook .SaveAs strPath1 & "\" & .Name .SaveAs strPath2 & "\" & .Name .SaveAs strPath3 & "\" & .Name End With End Sub -- Vasant "Joseph Spain" wrote in message news:8ygbe.5462$Bb.292@okepread06... Hi, I would like to request a macro that can do the following tasks: 1. check to see if three specific network paths are available 2. save to all of the network paths that are available, without generating errors (or messages) for the paths that are not available Any ideas? Hopefully, someone already has written such a macro. As always, thanks very much for your assistance and suggestions Best regards, Joseph |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
"Vasant Nanavati" <vasantn *AT* aol *DOT* com wrote:
Untested since I'm not networked right now: Sub SaveToAllPaths(strPath1 As String, strPath2 As String, strPath3 As String) On Error Resume Next With ThisWorkbook .SaveAs strPath1 & "\" & .Name .SaveAs strPath2 & "\" & .Name .SaveAs strPath3 & "\" & .Name End With End Sub -- Vasant Thanks much. I modified your idea slightly, and it works flawlessly. Good work. Best regards, Joseph |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You may want to look at SaveCopyAs in VBA's help for another alternative.
Joseph Spain wrote: "Vasant Nanavati" <vasantn *AT* aol *DOT* com wrote: Untested since I'm not networked right now: Sub SaveToAllPaths(strPath1 As String, strPath2 As String, strPath3 As String) On Error Resume Next With ThisWorkbook .SaveAs strPath1 & "\" & .Name .SaveAs strPath2 & "\" & .Name .SaveAs strPath3 & "\" & .Name End With End Sub -- Vasant Thanks much. I modified your idea slightly, and it works flawlessly. Good work. Best regards, Joseph -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Save document to multiple locations | New Users to Excel | |||
save to multiple locations simultaneously | Excel Discussion (Misc queries) | |||
How do you change the File save locations in Excel 2007? | Excel Discussion (Misc queries) | |||
How do I save each sheet as a separate .xls file by using macro? | Excel Programming | |||
Is it possible to save an Excel file to 2 locations? | New Users to Excel |