Power Query Course in Spanish
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 7 of 7

Thread: Message to user while macro is running

  1. #1
    New Member
    Join Date
    Mar 2002
    Posts
    24
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    I'm guessing that this is something that's pretty easy, but I can't work my way around it. I've tried searching the board, but I keep getting an error message.

    I have a macro that runs for 10-15 seconds. I'd like to have a message box (or user form???) show up while the macro is running telling the user that the job is running.

    Any direction would be appreciated.

    Thanks,
    Will

  2. #2
    Board Regular
    Join Date
    Mar 2002
    Location
    Cincinnati, Ohio, USA
    Posts
    6,824
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Hi
    Best way I have found to do this is either directly placing a message in the worksheet or create a userform with your message, place a call to your macro in the intitialize event, and show the form where you were intitially running your macro.
    Unload the form after your macro is completed running.
    If you need more details, please re-post.
    Tom

    [ This Message was edited by: TsTom on 2002-04-04 08:45 ]

  3. #3
    MrExcel MVP Al Chara's Avatar
    Join Date
    Feb 2002
    Location
    Newark, Delaware
    Posts
    1,701
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Try creating a userform. Have the first line of your macro be YourUserform.show and the last line be YourUserform.hide. Make a label on the userform that says "macro is running"
    Best regards,
    Allan Chara
    http://www.mrspreadsheets.com

  4. #4
    Board Regular
    Join Date
    Mar 2002
    Location
    Cincinnati, Ohio, USA
    Posts
    6,824
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Al Chara?
    Won't the code halt if the userform is modal?
    Tom

  5. #5
    New Member
    Join Date
    Mar 2002
    Posts
    24
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Thanks for the help. I've got the user form created, but it gets stuck after displaying it. How do you get it to keep running through the macro?

    Thanks again,
    Will

  6. #6
    MrExcel MVP Al Chara's Avatar
    Join Date
    Feb 2002
    Location
    Newark, Delaware
    Posts
    1,701
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Good point, I don't know how to get around this. Anyone else know?

  7. #7
    New Member
    Join Date
    Mar 2002
    Posts
    18
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    You are putting the code in a module that calls the Userform message?
    Try putting the macro code inside the Userform instead of putting it in the module.


Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •