+ Reply to Thread
Results 1 to 2 of 2

Message box to appear while macro is running

  1. #1
    Registered User
    Join Date
    05-25-2011
    Location
    Pennsylvania, USA
    MS-Off Ver
    Excel 2007
    Posts
    52

    Message box to appear while macro is running

    I have a user form that runs a macro. The macro performs lots of operations and takes a while to complete. While it is running I wanted to have a message box up on the screen saying something like "please wait". The problem is that if I just use "MsgBox", it will pause the code until ok is clicked. I tried having it load another user form by doing something like:

    pleasewaitform.show
    (my macro code)
    unload pleasewaitform

    but the same problem occurs where it won't run the macro until the box is closed.
    I know that there is a way to use a timer, but the time that the macro takes will change as I edit it. So I don't really want that. I want the box to pop up when a button is clicked, and stay on the screen while the macro runs, and then close. Is that possible? Thanks.

  2. #2
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Message box to appear while macro is running

    This does not sound like a good way to go; rather, add another worksheet that says, "Hold your horses, please wait" and have the macro activate that sheet before it starts.

    You could also look at some progress meters...

    http://www.andypope.info/vba/pmeter.htm

    This is just one site but if you do a google search you are bound to get more hits.
    HTH
    Regards, Jeff

+ 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