+ Reply to Thread
Results 1 to 3 of 3

How to CANCEL file SAVE PROMPT when MACRO is running?

  1. #1
    Stuart Macro Muppet
    Guest

    How to CANCEL file SAVE PROMPT when MACRO is running?

    I have created a macro that opens 4x text format files as Excel files, which
    copies and pastes their data into a master excel template.
    The 4x text files are inserted into one data sheet, the updated data sheet
    forms the basis for several pivot tables which are then run by the macro.
    The macro created closes the 4x text files when they have been copied.

    When closing the text files the prompt "Do You Want To Save xxxxx.txt?"
    appears, requiring manual intervention to select NO. The macro continues, the
    prompt appears 4 times for each file.

    The macro is required daily, no data manipulation of the text files occurs,
    they are only opened, copied, and closed.

    I do not want the Save Prompt appearing.

    How can I remove this?

    Many thanks

  2. #2
    Alan
    Guest

    Re: How to CANCEL file SAVE PROMPT when MACRO is running?

    Try wrapping the code in

    Application.DisplayAlerts = False
    'Your Code

    "Stuart Macro Muppet" <Stuart Macro [email protected]> wrote
    in message news:[email protected]...
    >I have created a macro that opens 4x text format files as Excel files,
    >which
    > copies and pastes their data into a master excel template.
    > The 4x text files are inserted into one data sheet, the updated data sheet
    > forms the basis for several pivot tables which are then run by the macro.
    > The macro created closes the 4x text files when they have been copied.
    >
    > When closing the text files the prompt "Do You Want To Save xxxxx.txt?"
    > appears, requiring manual intervention to select NO. The macro continues,
    > the
    > prompt appears 4 times for each file.
    >
    > The macro is required daily, no data manipulation of the text files
    > occurs,
    > they are only opened, copied, and closed.
    >
    > I do not want the Save Prompt appearing.
    >
    > How can I remove this?
    >
    > Many thanks




  3. #3
    Norman Jones
    Guest

    Re: How to CANCEL file SAVE PROMPT when MACRO is running?

    Hi Stuart,

    ActiveWorkbook.Close SaveChanges:=False


    ---
    Regards,
    Norman



    "Stuart Macro Muppet" <Stuart Macro [email protected]> wrote
    in message news:[email protected]...
    >I have created a macro that opens 4x text format files as Excel files,
    >which
    > copies and pastes their data into a master excel template.
    > The 4x text files are inserted into one data sheet, the updated data sheet
    > forms the basis for several pivot tables which are then run by the macro.
    > The macro created closes the 4x text files when they have been copied.
    >
    > When closing the text files the prompt "Do You Want To Save xxxxx.txt?"
    > appears, requiring manual intervention to select NO. The macro continues,
    > the
    > prompt appears 4 times for each file.
    >
    > The macro is required daily, no data manipulation of the text files
    > occurs,
    > they are only opened, copied, and closed.
    >
    > I do not want the Save Prompt appearing.
    >
    > How can I remove this?
    >
    > Many thanks




+ 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