[Excel 2003] Progress Indicator / Status Bar
I am using this code to show progress and that the macro isn't hanging
vb Code:
'Update status bar with message
Application.StatusBar = "Splitting contents of: " & sFile
'...
'...Do stuff (potentially in a loop updating i each time)
Application.StatusBar = "Updating.." & i
'...
'...Do stuff (potentially in a loop updating i each time)
Application.StatusBar = "Loading.." & i
'...
'Give status bar back to Excel
Application.StatusBar = False
What can I do though if the majority of the work is done in one 'Split' statement at the start?
The macro would still look like it is hanging.
I sort of feel a new thread is needed to be spawned to update the StatusBar until the Split is finished.
Even if that is the way to go, I'm not sure how to do it :o
Any ideas?
Re: [Excel 2003] Progress Indicator / Status Bar
Making a good progress indicator is an art. Since your indicator is plain text in the statusbar, you could use a spinner at the end (/ .. - .. \ .. - .. /) updated at regular millisecond intervals.
Re: [Excel 2003] Progress Indicator / Status Bar
you could use a timer to keep updating the status bar, but you would have to create it by API, as no timer control in excel
Re: [Excel 2003] Progress Indicator / Status Bar
Have you tried using a DoEvent inbetween each one?