Closed Thread
Results 1 to 5 of 5

Application.DisplayAlerts doesn't seem to work

  1. #1

    Application.DisplayAlerts doesn't seem to work

    I'm trying to load a custom add-in automatically and the add-in
    displays an alert saying that it was loaded and the user must click OK
    or press the Enter key for the alert to close. I would like to supress
    this alert so that the rest of my macro can finish without user
    interaction (this is just one small subroutine in a larger process).
    Can anyone explain to me why displayalerts=false doesn't work and what
    a workaround might be? I also find that the second macro below
    (TestAlerts) has the Hello World message box pop-up, so I'm fairly
    confused about what DisplayAlerts actually does.

    Is there some other automated way to close alert windows?

    Sub LoadAddIn()
    AddIns.Add Filename:="C:\abc\addin32.xll"
    Application.DisplayAlerts = False
    AddIns("ABC32").Installed = True
    Application.DisplayAlerts = True
    End Sub

    Sub TestAlerts()
    Application.DisplayAlerts = False
    Msgbox "Hello World!"
    Application.DisplayAlerts = True
    End Sub

    I'm using the following:
    OS version - Windows (32-bit) NT 5.01
    Excel Release - 11.0

    Thanks for whatever help you can give!
    -Jason


  2. #2
    Tom Ogilvy
    Guest

    RE: Application.DisplayAlerts doesn't seem to work

    DisplayAlerts suppresses most prompts from the excel application itself (not
    the operating system). It does not affect msgboxes generated by code as you
    have discovered.

    --
    Regards,
    Tom Ogilvy


    "[email protected]" wrote:

    > I'm trying to load a custom add-in automatically and the add-in
    > displays an alert saying that it was loaded and the user must click OK
    > or press the Enter key for the alert to close. I would like to supress
    > this alert so that the rest of my macro can finish without user
    > interaction (this is just one small subroutine in a larger process).
    > Can anyone explain to me why displayalerts=false doesn't work and what
    > a workaround might be? I also find that the second macro below
    > (TestAlerts) has the Hello World message box pop-up, so I'm fairly
    > confused about what DisplayAlerts actually does.
    >
    > Is there some other automated way to close alert windows?
    >
    > Sub LoadAddIn()
    > AddIns.Add Filename:="C:\abc\addin32.xll"
    > Application.DisplayAlerts = False
    > AddIns("ABC32").Installed = True
    > Application.DisplayAlerts = True
    > End Sub
    >
    > Sub TestAlerts()
    > Application.DisplayAlerts = False
    > Msgbox "Hello World!"
    > Application.DisplayAlerts = True
    > End Sub
    >
    > I'm using the following:
    > OS version - Windows (32-bit) NT 5.01
    > Excel Release - 11.0
    >
    > Thanks for whatever help you can give!
    > -Jason
    >
    >


  3. #3

    Re: Application.DisplayAlerts doesn't seem to work

    Is there anyway to suppress or respond to a prompt that is tying up
    Excel but is not suppressed by DisplayAlerts?
    -Jason


  4. #4
    Tom Ogilvy
    Guest

    Re: Application.DisplayAlerts doesn't seem to work

    Basically no built in way.

    --
    Regards,
    Tom Ogilvy


    <[email protected]> wrote in message
    news:[email protected]...
    > Is there anyway to suppress or respond to a prompt that is tying up
    > Excel but is not suppressed by DisplayAlerts?
    > -Jason
    >




  5. #5

    Re: Application.DisplayAlerts doesn't seem to work

    Thanks for your help, Tom!


Closed 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