Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a db query that take a long time to run. I was wondering if I
could have a progress bar updating while the query is running. Essentially I would estimate how long the query would take and set a loop to take approximately the same time. I have used progress bars in the past. The part that I do not know how to do (or if it is possible) is to have the progress bar loop running while other code is simultaneously running. Any help is greatly appreciated! Cheers! Rob |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Unless you have some interrupts in the query where you can update the PB
from, it won't be very effective. -- --- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "Rob" wrote in message ... I have a db query that take a long time to run. I was wondering if I could have a progress bar updating while the query is running. Essentially I would estimate how long the query would take and set a loop to take approximately the same time. I have used progress bars in the past. The part that I do not know how to do (or if it is possible) is to have the progress bar loop running while other code is simultaneously running. Any help is greatly appreciated! Cheers! Rob |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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. |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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. |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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. |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dude, do you have an example of this? I can't seem to make it work. It
"debugs" out. Thanks "The Dude" wrote: 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. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Append Excel Sheet from constantly updating delimited text file | Setting up and Configuration of Excel | |||
Excel freezing up constantly | Excel Discussion (Misc queries) | |||
NEED Help - How to capture the Event's progress in Progress Bar | Excel Programming | |||
Auto Updating of Progress Reports... | Excel Programming | |||
Constantly Run a Macro | Excel Programming |