Vba screen updating status bar

At the end of my macro I would like to restore the status bar back to its default status of showing the page and word counts. The status bar portion of the Excel screen gives you a simple and convenient method do display message to the user.

The cancel button text can also be set, for instance to "Stop" or "Cancel Generation". If set to vb Null String, the cancel button is hidden entirely.

An optional label can show the time elapsed since the dialogue box was configured.

(You can test this in the example below.) This can be disabled, in which case no time is wasted in computing the remaining time.

Your calling routine can get the current value of the progress bar, as well as the formatted run time.

This is something you could do yourself, but to get you started, I've been employing and improving on my own custom progress bar for quite some time now.

I think you should find it useful and very customizable: Features An optional cancel button allows the user a mechanism to halt your lengthy process.

Excel experts should have learned by now that by setting Application.

Screen Updating = False as the first step to a VBA routine can speed up code execution by orders of magnitude.

(i.e., the flicker of sheets being activated, cells being changed, etc...).

This is generally a terrible idea unless the whole routine is finished very quickly.

You can use it to display the progress of a VBA procedure, or indicate that the procedure is complete.

Tags: , ,