Progress bar that is constantly updating
You have several ways to show the progression of your coding:
- display a message in the statusbar with the application.statusbar function.
- display a userform that will show the progressbar.
Obviously the first one is the easiest. For the second one, you must first
install an extension in your userform's toolbar.
First, create a userform. Right-click the toolbar (where you have the
controls) and add the 'Microsoft Progressbar Control'. Design your userform
as you like, with a text label for instance to display messages or only the
progressbar.
Then, make sure that the Userform is NOT MODAL (Showmodal = false) so that
it does not halt the code.
You have two ways to update the userform: create a function that will group
the modification and call the function regularly, or insert the code in your
sub.
an example of code directly in your sub :
userform.progressbar1 = 50 'to show 50%
doevents 'let the system update the display (you loose very little
time...)
OR
function progress_bar_update(progress, text)
userform.progressbar1 = progress
userform.text1 = text
doevents
end function
then you can call this function by for instance progress_bar_update(50, "My
text")
"Bob Phillips" wrote:
No, by not effective, I mean it won't be moving. You need an interrupt to
move the PB along.
--
---
HTH
Bob
(there's no email, no snail mail, but somewhere should be gmail in my addy)
"Rob" wrote in message
...
I agree that it will not be very effective, but I just wanted to have
something moving so that the user knows that the query is still
chugging.
|