The StatusBar property allows you to assign a text string to be displayed on the left of the statusbar.
This is an easy way to keep users informed of progress during a length macro.
This should definitely be used when you turn ScreenUpdating off and there is no sign of activity of the screen.
StatusBar messages are still displayed even when ScreenUpdating is turned off.
At the end of the process you must change the StatusBar property to False so it can return to its normal status.

Using the Status bar

If you switch the ScreenUpdating off to prevent the screen from flickering it is worth using the Status bar to keep the user informed about the current status of the macro.
If your macro takes a bit of time to complete using the status bar will ensure that the user does not think that the macro has crashed or is not responding.

   ' Make sure that the status bar is visible
Application.DisplayStatusBar = True

' Enter the message to be displayed
Application.StatusBar = "Please wait "

' **** Add Your Code Here ****

' When the macro has finished reset the status bar
Application.StatusBar = False

If you change the status bar to display a message to the user - make sure you reset it.


Application.StatusBar = "1 of 100" 
Application.StatusBar = False


Instead of assigning False which you do in Excel, you need to assign an empty string.

Application.StatusBar = "2 of 100" 
Application.StatusBar = ""


The property Application.StatusBar does not exist in PowerPoint.


If you do not reset the StatusBar after you have finished with it your last message will remain until the application is closed.

© 2024 Better Solutions Limited. All Rights Reserved. © 2024 Better Solutions Limited TopPrevNext