View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default macro to save to network

Did you try

On Error Resume Next
Application.DisplayAlerts = False

ActiveWorkbook.SaveAs Filename:= _
"\\Stevebrant\SharedDocs\Draught.xls" _
, FileFormat:=xlNormal, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False
Application.DisplayAlerts = True
On Error goto 0

--
Regards,
Tom Ogilvy


"jim hardwick" wrote in message
...
hello,

I have a problem saving and excel workbook. I want the workbook to save to
several network locations without prompting to replace which I have done

as
per below;

Application.DisplayAlerts = False

ActiveWorkbook.SaveAs Filename:= _
"\\Stevebrant\SharedDocs\Draught.xls" _
, FileFormat:=xlNormal, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False

But if the networked computer is offline the macro fails - can I get the
macro to only save if the computer is turned on or to continue regardless?

Help me please!!