+ Reply to Thread
Results 1 to 2 of 2

macro to save to network

  1. #1
    jim hardwick
    Guest

    macro to save to network

    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!!

  2. #2
    Tom Ogilvy
    Guest

    Re: 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" <[email protected]> wrote in message
    news:[email protected]...
    > 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!!




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1