PDA

View Full Version : progress bar



SteveM99
10-22-2017, 07:10 PM
I have several macros that I run from a master macro calling them in sequence. I was trying to create a progress bar to show the user that status of the master macro progression. I was able to monkey around with a status bar macro but that is not what I really want. I would like a progress bar in the middle of the screen. I spent a good part of my weekend researching a few different versions of the progress bar out there. Still have not found what I need but partly because I am very very green on macro/vba code. I do not have many looping macros but rather several being called one after the other (which take different times to process) to move along the creation of the spreadsheets. I ran across this persons site which was kind of in the ball park but I did not know where to adjust the code. https://strugglingtoexcel.com/2014/09/22/class-progress-bar-excel-vba/

The progress bar and sub bar are great in the examples but I don't know how to adjust the code to take his out and put mine in. His are color changes and counting those changes to move the progress bar along. Mine are more like executable parts of a chain. I am fine with doing them in an estimated sequence percentage change. For example after the first macro 10% is done, after the second 20% is done (10% added), etc. I can then adjust the code once I review the processing times of each called macro. But I want the progress bar (and hopefully sub bar) to show colorfully in the middle of the screen.:bug:

SamT
10-22-2017, 08:11 PM
to move along the creation of the spreadsheets.
If you have Screen Updating turned off and all that creation takes less than three seconds, you don't want update the User about your code's progress, it gets irritating. If it takes less than 10 seconds, you still only want the Status Bar updated, at least the Status Bar can be ignored unless one is interested .

If you can't create 3 to 10, complete, complex, custom sheets in less than a second, you're doing something that is not optimum.

Show us your Code.