Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default request macro to save file to multiple, separate locations

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,080
Default request macro to save file to multiple, separate locations

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default request macro to save file to multiple, separate locations

"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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,758
Default request macro to save file to multiple, separate locations

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Save document to multiple locations Bob[_13_] New Users to Excel 1 January 19th 08 08:29 PM
save to multiple locations simultaneously MOSwannabe Excel Discussion (Misc queries) 1 October 29th 07 07:00 PM
How do you change the File save locations in Excel 2007? pglufkin Excel Discussion (Misc queries) 2 December 18th 06 07:22 PM
How do I save each sheet as a separate .xls file by using macro? Min Excel Programming 5 February 17th 05 10:47 PM
Is it possible to save an Excel file to 2 locations? Chris_7_1 New Users to Excel 1 January 7th 05 01:03 AM


All times are GMT +1. The time now is 12:28 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"