ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Save to all computers on network from Excel 2007 (https://www.excelbanter.com/excel-programming/424214-save-all-computers-network-excel-2007-a.html)

Philosophaie

Save to all computers on network from Excel 2007
 
Is there a way to save using VBA code from the current file to all the
computers on the network.

Example:

dim filetosave(3) as string
filetosave(1)="\\Computer1\Documents\Books.xlsx"
filetosave(2)="\\Computer2\Documents\Books.xlsx"
filetosave(3)="\\Computer3\Documents\Books.xlsx"

for k=1 to 3
'Save code goes here for each computer on network?
next k

I don't want to use saveas because it will clutter the 'Recent Documents'.
Can anyone help?

FSt1

Save to all computers on network from Excel 2007
 
hi
in theory, there should be no problem. i have had situations where i had a
duel save to my harddrive and to a network drive or flash drive. all you need
is all the file paths. and there could be issues with that if IT decides to
change things. Oops. and there may be other issues.
see this site for more details
http://support.microsoft.com/kb/271513
you must use save as if its the first time saved to a location so as to
establish the file path. after that a regular save is possible.
here is an example of a duel save i use to save to my flash drive and c drive.
i can't find an example i use to save to a net work drive. they are all at
work.
sorry.
Sub FlashSave()
Application.DisplayAlerts = False
Application.StatusBar = "Saving to Flash"
ChDir "G:\Excel"

ActiveWorkbook.SaveAs Filename:="G:\Excel\Expences2009.xls", _
FileFormat:=xlNormal, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False
Application.StatusBar = "saving to c drive"

ChDir "C:\Documents and Settings\FSt1\My Documents\XL"
ActiveWorkbook.SaveAs Filename:= _
"C:\Documents and Settings\FSt1\My Documents\XL\Expences2009.xls", _
FileFormat:=xlNormal, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False
Application.DisplayAlerts = True
Application.StatusBar = False
MsgBox "Finished Saving."
End Sub


regards
FSt1

"Philosophaie" wrote:

Is there a way to save using VBA code from the current file to all the
computers on the network.

Example:

dim filetosave(3) as string
filetosave(1)="\\Computer1\Documents\Books.xlsx"
filetosave(2)="\\Computer2\Documents\Books.xlsx"
filetosave(3)="\\Computer3\Documents\Books.xlsx"

for k=1 to 3
'Save code goes here for each computer on network?
next k

I don't want to use saveas because it will clutter the 'Recent Documents'.
Can anyone help?


Jon Peltier

Save to all computers on network from Excel 2007
 
It's more reliable to use Save for the master copy of the workbook
(presumably on your hard drive) and use SaveCopyAs for any copies you want
to make.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services, Inc.
http://PeltierTech.com/WordPress/
_______


"FSt1" wrote in message
...
hi
in theory, there should be no problem. i have had situations where i had a
duel save to my harddrive and to a network drive or flash drive. all you
need
is all the file paths. and there could be issues with that if IT decides
to
change things. Oops. and there may be other issues.
see this site for more details
http://support.microsoft.com/kb/271513
you must use save as if its the first time saved to a location so as to
establish the file path. after that a regular save is possible.
here is an example of a duel save i use to save to my flash drive and c
drive.
i can't find an example i use to save to a net work drive. they are all at
work.
sorry.
Sub FlashSave()
Application.DisplayAlerts = False
Application.StatusBar = "Saving to Flash"
ChDir "G:\Excel"

ActiveWorkbook.SaveAs Filename:="G:\Excel\Expences2009.xls", _
FileFormat:=xlNormal, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False
Application.StatusBar = "saving to c drive"

ChDir "C:\Documents and Settings\FSt1\My Documents\XL"
ActiveWorkbook.SaveAs Filename:= _
"C:\Documents and Settings\FSt1\My Documents\XL\Expences2009.xls",
_
FileFormat:=xlNormal, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False
Application.DisplayAlerts = True
Application.StatusBar = False
MsgBox "Finished Saving."
End Sub


regards
FSt1

"Philosophaie" wrote:

Is there a way to save using VBA code from the current file to all the
computers on the network.

Example:

dim filetosave(3) as string
filetosave(1)="\\Computer1\Documents\Books.xlsx"
filetosave(2)="\\Computer2\Documents\Books.xlsx"
filetosave(3)="\\Computer3\Documents\Books.xlsx"

for k=1 to 3
'Save code goes here for each computer on network?
next k

I don't want to use saveas because it will clutter the 'Recent
Documents'.
Can anyone help?





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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com