Save to all computers on network from Excel 2007

P

Philosophaie

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?
 
F

FSt1

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
 
J

Jon Peltier

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
 

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

Top