+ Reply to Thread
Results 1 to 3 of 3

Close with no pop-up?

  1. #1
    CLR
    Guest

    Close with no pop-up?

    Hi All.....

    I have a macro that opens a second workbook and does things with it and then
    I want to close it, but then I give it the following code, the macro stops,
    and I get a pop-up that asks "Do you want to save?".....No, I don't want to
    save and No, I don't want the pop-up to stop my macro operation.........how
    please can I close the other workbook without getting the pop-up?


    'Close the q793Complete workbook
    Windows("q793Complete.xls").Activate
    ActiveWorkbook.Close

    TIA
    Vaya con Dios,
    Chuck, CABGx3





  2. #2
    Lonnie M.
    Guest

    Re: Close with no pop-up?

    Hi, try something like this (Assuming that the workbook is the active
    workbook):

    Application.DisplayAlerts = False
    ActiveWorkbook.Close SaveChanges:=False
    Application.DisplayAlerts = True

    HTH--Lonnie M.


  3. #3
    CLR
    Guest

    Re: Close with no pop-up?

    Thanks Lonnie, that worked just great!!

    Vaya con Dios,
    Chuck, CABGx3


    "Lonnie M." wrote:

    > Hi, try something like this (Assuming that the workbook is the active
    > workbook):
    >
    > Application.DisplayAlerts = False
    > ActiveWorkbook.Close SaveChanges:=False
    > Application.DisplayAlerts = True
    >
    > HTH--Lonnie M.
    >
    >


+ 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