+ Reply to Thread
Results 1 to 5 of 5

Display multiple messages in status bar while macro is running

  1. #1
    Registered User
    Join Date
    11-18-2014
    Location
    Uganda
    MS-Off Ver
    2013
    Posts
    25

    Cool Display multiple messages in status bar while macro is running

    Hi Team,

    I was wondering if there was a way in vba, to have the status bar, display multiple messages (one at a time of course), whislt a macro is running in the background? (Yes, this is for entertainment purposes for the user whilst they wait for the macro to finish).

    I found this --> http://datapigtechnologies.com/blog/...he-status-bar/ - here part of the code displays a series of messages at certain timed intervals if I understand it correctly (correct me if I am wrong please). So i was thinking, going from the example in the provided link, would it be a matter of duplicating the "status bar message" code?

    What I am thinking is this:

    Please Login or Register  to view this content.

    And so on...

    I understand the original example in the link above is to represent a progress meter of some kind, but what I am looking to do is to code in a bunch of useless facts for the user to read whilst waiting.

    Would this be the way to do as per above? or could there be a more efficient way in accomplishing this task?

    Many Thanks for any help given :-)

    Hooroo

  2. #2
    Forum Expert dominicb's Avatar
    Join Date
    01-25-2005
    Location
    Lancashire, England
    MS-Off Ver
    MS Office 2000, 2003, 2007 & 2016 365
    Posts
    4,867

    Re: Display multiple messages in status bar while macro is running

    Good afternoon StevTheFish

    ...and welcome to the forum!!

    You're on the way there, but...

    What the code does is wait a fixed period before changing the message. The wait will halt all executing message, so you're macro won't run until all the lessages have been displayed.

    I assume you're using some kind of loop to run the macro? It all depends what's going on, but the easiest way is to build a counter in your loop, start at zero, and increment with one every loop. Then include a check that if, say, C=5,000, then show message 1. If C=10,000 then show message 2 etc.

    HTH

    DominicB

  3. #3
    Registered User
    Join Date
    11-18-2014
    Location
    Uganda
    MS-Off Ver
    2013
    Posts
    25

    Re: Display multiple messages in status bar while macro is running

    Hi DominicB - Thanks so much for helping out

    I was about to run off to the hills and dance my way to victory until you said loop and a check part. I looked further into the example in the link above and found that another excel sensai commented explaining something very similar as what you have suggested with the following:

    by Andy Pope ([email protected])

    Please Login or Register  to view this content.
    So, with all honesty, I have tried just copying this sucker in to work with my macro, but won't work and yes, this is where my brain stops me and says chill out

    Any way to make this work, with the idea you have suggested?

    Alternatively, I am just thinking to leave the thing as it is and the user can just wait with no messages.

  4. #4
    Forum Expert dominicb's Avatar
    Join Date
    01-25-2005
    Location
    Lancashire, England
    MS-Off Ver
    MS Office 2000, 2003, 2007 & 2016 365
    Posts
    4,867

    Re: Display multiple messages in status bar while macro is running

    Hi SteveTheFish

    Can you post your code, or even a workbook containing your code.
    Someone will need to see what it's doing and when.

    If your code is really long (ie, lots of it) you might just be able to put the different messages in at strategic points.

    HTH

    DominicB

  5. #5
    Registered User
    Join Date
    11-18-2014
    Location
    Uganda
    MS-Off Ver
    2013
    Posts
    25

    Re: Display multiple messages in status bar while macro is running

    Quote Originally Posted by dominicb View Post
    Hi SteveTheFish

    Can you post your code, or even a workbook containing your code.
    Someone will need to see what it's doing and when.

    If your code is really long (ie, lots of it) you might just be able to put the different messages in at strategic points.

    HTH

    DominicB
    Hey DominicB - Thanks for your the additional help

    I was able to track down another excel guru in another department to give me a hand with this. I shared with him your suggestions and he agreed with your idea of placing messages at certain points would be the easiest way due to the way I have built my code to run (i.e - Very Nooby & messy, but still works - and yes it is quite long). I've also shared the link to this post so hopefully he'll drop in to say 'Thanks' himself otherwise a big THANK YOU from both of us haha

    Cheers - Steve

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Status Bar for Running Macro
    By glennjrobertson1980 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-11-2014, 12:20 PM
  2. Macro to display all input messages
    By brunoricardo in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 05-02-2013, 11:19 AM
  3. Replies: 4
    Last Post: 04-08-2012, 09:43 PM
  4. Replies: 2
    Last Post: 05-31-2005, 07:05 AM
  5. [SOLVED] Suppressing information messages during macro running
    By John Gilchrist in forum Excel General
    Replies: 1
    Last Post: 02-25-2005, 08:06 PM

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