Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Do Events in Excel 1

Status
Not open for further replies.

nickjar2

Programmer
Jun 20, 2001
778
US
I remember a few years ago using VB4 and there was a 'Do Events' function. From what I remember, you could run code and still process other things.
I am running BO reports through Excel, and these can take over an hour to run. Is there a way to add a progress bar so the user can see that excel hasn't hung, but is merely taking a while to do its processing. I know I have done something similar in VB but it has been 2 or 3 years at least.

Cheers,

Nick
 
Instead of a progress bar, which I don't know how to do, I have used the Window Caption to indicate the status of a long process.


CaptionSave = ActiveWorkbook.Windows(1).Caption ' Saves heading at top of screen

' Here is where you measure the "progress". Create a formula that suits your needs. The following is just an example. You might want to calculate a % or something.

If IntB / 100 = Int(IntB / 100) Then ActiveWorkbook.Windows(1).Caption = "Reading Record # " & IntB ' Put status at top of screen

'After all is finished . . . .
ActiveWorkbook.Windows(1).Caption = CaptionSave ' Put caption back the way it was

Not what you asked for, but one way to still get there.
 
Hi JV,

Cheers for the response. I wasn't sure whether I was going to get one. I will give that a go, as it doesn't bother me how it is done, as long as the user can see something. I will let you know how I get on.

Cheers,

Nick
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top