Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default Progress bar that is constantly updating

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default Progress bar that is constantly updating

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default Progress bar that is constantly updating

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default Progress bar that is constantly updating

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default 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.






  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 304
Default Progress bar that is constantly updating

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Append Excel Sheet from constantly updating delimited text file Ker G Setting up and Configuration of Excel 1 April 8th 08 09:33 PM
Excel freezing up constantly Marybeth Excel Discussion (Misc queries) 2 April 24th 07 04:34 PM
NEED Help - How to capture the Event's progress in Progress Bar Sriram Excel Programming 6 August 22nd 06 12:04 PM
Auto Updating of Progress Reports... TomCat Excel Programming 0 July 24th 06 11:30 AM
Constantly Run a Macro Stu[_5_] Excel Programming 1 September 26th 03 10:39 PM


All times are GMT +1. The time now is 06:52 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"