+ Reply to Thread
Results 1 to 10 of 10

Closing a Message Box Automatically

  1. #1
    Forum Contributor
    Join Date
    09-25-2012
    Location
    Ventura, united States
    MS-Off Ver
    Excel 2010
    Posts
    346

    Closing a Message Box Automatically

    Frequently when writing my macros, I want a message box to come up, but if nobody clicks OK after 2 seconds I want the message box to close and the macro to continue to run. I don't know the proper code, but here is my attempt.

    Please Login or Register  to view this content.

  2. #2
    Forum Contributor
    Join Date
    12-31-2012
    Location
    Jhang, Pakistan
    MS-Off Ver
    Excel 2010
    Posts
    250

    Re: Closing a Message Box Automatically

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    09-25-2012
    Location
    Ventura, united States
    MS-Off Ver
    Excel 2010
    Posts
    346

    Re: Closing a Message Box Automatically

    This code doesn't close the message box or continue running the code that comes afterward until you click "OK".

  4. #4
    Forum Contributor
    Join Date
    04-03-2012
    Location
    Washington State
    MS-Off Ver
    Excel 365
    Posts
    340

    Re: Closing a Message Box Automatically

    Hi, should be something like this:

    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    01-18-2012
    Location
    nr Salisbury, UK
    MS-Off Ver
    Excel 2010
    Posts
    126

    Re: Closing a Message Box Automatically

    If you are happy with the code to run without response from OP why have it?

    juls

  6. #6
    Forum Contributor
    Join Date
    09-25-2012
    Location
    Ventura, united States
    MS-Off Ver
    Excel 2010
    Posts
    346

    Re: Closing a Message Box Automatically

    Nu2Java, this doesn't run the rest of the code until you click "OK".

    julhs, my coworker and I write messages to each other to keep each other up to date. It's not essential that we read them and if we go to the bathroom or something I don't want the macro to waste all that time.

    Do you have a better idea, without making a new sheet or writing in the actual workbook?

  7. #7
    Forum Contributor
    Join Date
    04-03-2012
    Location
    Washington State
    MS-Off Ver
    Excel 365
    Posts
    340

    Re: Closing a Message Box Automatically

    I am wondering how you are using the code because this works for me and closes automatic and continues running the rest of the code after.

  8. #8
    Forum Contributor
    Join Date
    04-03-2012
    Location
    Washington State
    MS-Off Ver
    Excel 365
    Posts
    340

    Re: Closing a Message Box Automatically

    I do notice on a slower PC that you must give it atleast 3 seconds, otherwise it might not close.

  9. #9
    Forum Contributor
    Join Date
    01-18-2012
    Location
    nr Salisbury, UK
    MS-Off Ver
    Excel 2010
    Posts
    126

    Re: Closing a Message Box Automatically

    It is just that I have written messages in to my code and have been wondering if all of them are necassary so curious as to your reason for keeping yours

  10. #10
    Forum Contributor
    Join Date
    12-31-2012
    Location
    Jhang, Pakistan
    MS-Off Ver
    Excel 2010
    Posts
    250

    Re: Closing a Message Box Automatically

    What's the rest of your code???

+ 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