+ Reply to Thread
Results 1 to 4 of 4

Macro runs perfectly, but dialog box doesn't close automatically

  1. #1
    Registered User
    Join Date
    10-08-2012
    Location
    Chico, California
    MS-Off Ver
    Excel 2007
    Posts
    7

    Macro runs perfectly, but dialog box doesn't close automatically

    I have written a macro that is tied to a clickable button. The button opens a dialog box that contains a couple of options and two buttons; one to run the macro and the other to stop the macro. I am able to click on the button to run the macro, and I can tell that the macro is working by my mouse cursor changing to the loading icon. Once the loading mouse icon disappears, the dialog box remains on the screen and nothing happens. I have to click the button to stop the macro in order to get rid of the dialog box and for the excel sheet to display the updated information that the macro processed.

    How do I program the macro to automatically close the dialog box once it has finished running?

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,645
    What dialog box are you working with and how are you calling it?
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    11-26-2012
    Location
    Horjul, Slovenia
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Macro runs perfectly, but dialog box doesn't close automatically

    Quote Originally Posted by Bunnyla View Post
    How do I program the macro to automatically close the dialog box once it has finished running?
    Please Login or Register  to view this content.
    If I understand correctly, just add the "Unload Me" before "End Sub"

    I don't know what happens with the rest of your code though
    Last edited by dexboy; 11-29-2012 at 10:13 AM. Reason: added quote

  4. #4
    Registered User
    Join Date
    10-08-2012
    Location
    Chico, California
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Macro runs perfectly, but dialog box doesn't close automatically

    Thanks dexboy, that worked!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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