+ Reply to Thread
Results 1 to 3 of 3

_Workbook::SaveAs(...)

  1. #1
    Fritz Hilgemann
    Guest

    _Workbook::SaveAs(...)

    Hello NG,

    I'm certain somebody already encountered this problem (I am using OLE
    Automation with VC++):

    If I want to save a workbook or worksheet with "SaveAs", and the target file
    already exists, I get a MessageBox "This file already exists. Do you
    want...". Of course, in an automated program, I don't want to answer message
    boxes, instead I always want to override the existing file.
    - I cannot find if one of the many parameters to supply with SaveAs controls
    this behavior (I experimented with no success).
    - Maybe it is an option which needs to be set correctly?

    Thanks for any comments
    Fritz



  2. #2
    Jim Rech
    Guest

    Re: _Workbook::SaveAs(...)

    I don't do VC++ but in VBA Application.DisplayAlerts = False before the
    SaveAs suppresses the warning.

    --
    Jim
    "Fritz Hilgemann" <[email protected]> wrote in message
    news:[email protected]...
    | Hello NG,
    |
    | I'm certain somebody already encountered this problem (I am using OLE
    | Automation with VC++):
    |
    | If I want to save a workbook or worksheet with "SaveAs", and the target
    file
    | already exists, I get a MessageBox "This file already exists. Do you
    | want...". Of course, in an automated program, I don't want to answer
    message
    | boxes, instead I always want to override the existing file.
    | - I cannot find if one of the many parameters to supply with SaveAs
    controls
    | this behavior (I experimented with no success).
    | - Maybe it is an option which needs to be set correctly?
    |
    | Thanks for any comments
    | Fritz
    |
    |



  3. #3
    Chip Pearson
    Guest

    Re: _Workbook::SaveAs(...)

    You can either delete existing file first, or you can set the
    Application.DisplayAlerts property to False.


    --
    Cordially,
    Chip Pearson
    Microsoft MVP - Excel
    Pearson Software Consulting, LLC
    www.cpearson.com


    "Fritz Hilgemann" <[email protected]> wrote in message
    news:[email protected]...
    > Hello NG,
    >
    > I'm certain somebody already encountered this problem (I am
    > using OLE
    > Automation with VC++):
    >
    > If I want to save a workbook or worksheet with "SaveAs", and
    > the target file
    > already exists, I get a MessageBox "This file already exists.
    > Do you
    > want...". Of course, in an automated program, I don't want to
    > answer message
    > boxes, instead I always want to override the existing file.
    > - I cannot find if one of the many parameters to supply with
    > SaveAs controls
    > this behavior (I experimented with no success).
    > - Maybe it is an option which needs to be set correctly?
    >
    > Thanks for any comments
    > Fritz
    >
    >




+ 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