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 John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need a progress display while macro is running

Status
Not open for further replies.

EdgarLopez

Programmer
Jul 27, 2006
1
CA
I'm developing a massive macro (low profile software) for a company that performs thousands of calculations and hence runs for a very long time.

I don't want to give the user an epileptic seizure so I turned screen updates off... however, I don't want the user to sit there looking at the screen for ages thinking nothing is going on.

Is it possible to display the progress or the percentage of the code execution on a box while the code is running?

I'm working with Excel type tiles.

Thanks!
 



Hi,

Have you considered displaying progress using the StatusBar?

What will progress be based on?

Skip,

[glasses] [red][/red]
[tongue]
 
Hi,

Yes, of course. That would be the Application.Statusbar property. If you're looping, it could go like this ...

Code:
Dim i as long, lngTotal as long
lngTotal = 1000
For i = 1 to lngTotal
Application.Statusbar = "Processing " i & " of " & lngTotal
'do code here
Next i
Msgbox "Complete!"
Application.Statusbar = False

You can also do a progress bar. See this Knowledge Base link ...


HTH

Regards,
Zack Barresse

Simplicity is the ultimate sophistication. What is a MS MVP? PODA
- Leonardo da Vinci
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top