Return to VBA Code Examples

VBA – Display Status Bar Message

At the bottom-left corner of Excel, you’ll find a Status Bar:

vba update status bar

Excel uses this status bar to communicate messages to you. However the StatusBar Property can also be adjusted using VBA, allowing you to display your own messages.

Custom Status Bar Message

You can update the status bar with your own custom message in Excel while a macro is running, using the StatusBar property.

1. Place this code in a macro whenever you want to update the user with a custom status bar message:

2. And at the end of your macro place this code to clear the status bar and return control back to Excel:


Disable Status Bar Updating

Instead of displaying a message while your procedure runs, you can disable the Status Bar.  This will increase the speed of your VBA code as Excel can skip processing what Status Bar message to display.

To disable Status Bar updating while your code is running set the DisplayStatusBar property to false.

At the end of your code, restore Status Bar updating:

Important! Use the StatusBar property to set messages, but use the DisplayStatusBar property to disable or enable the status bar altogether.

Speed Up VBA Code

For optimal processing speed try using this code:

VBA Coding Made Easy

Stop searching for VBA code online. Learn more about AutoMacro – A VBA Code Builder that allows beginners to code procedures from scratch with minimal coding knowledge and with many time-saving features for all users!

alt text


Learn More!

<<Return to VBA Examples