Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, 2013, and 2016. If you are using an earlier version (Excel 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Excel, click here: Using the Status Bar.
by Allen Wyatt
(last updated March 18, 2021)
Typically, one of the first things you do when you create a macro is use a command that turns off updating the screen display. This is done because the macro will run faster when it does not have to update the screen. When this is done, one of the most important things you can do is provide feedback to the user so they don't think their system has gone out to lunch.
A common method of providing feedback is through the use of the status bar. Using VBA, this is done with a code line similar to the following:
Application.StatusBar = "Updating past months..."
This line causes the message Updating past months... to display on the status bar of the application program. This message remains there until another message is written to the status bar, either by your macro or by Excel.
If you want to erase the message on the status bar, there are two ways you can do it. The first is to write an empty string to the status bar, as in the following code:
Application.StatusBar = ""
In this case, there is nothing between the quote marks, so an empty string is displayed on the status bar, erasing whatever was there before. The other method is to use the following line:
Application.StatusBar = False
Writing the logical value FALSE to the Application.StatusBar property erases whatever you wrote on the status bar before and restores the default status bar text.
ExcelTips is your source for cost-effective Microsoft Excel training. This tip (12319) applies to Microsoft Excel 2007, 2010, 2013, and 2016. You can find a version of this tip for the older menu interface of Excel here: Using the Status Bar.
Solve Real Business Problems Master business modeling and analysis techniques with Excel and transform data into bottom-line results. This hands-on, scenario-focused guide shows you how to use the latest Excel tools to integrate data from multiple tables. Check out Microsoft Excel 2013 Data Analysis and Business Modeling today!
Want to replace all commas in a formatted number with periods, and vice-versa? There are a couple of approaches you can ...Discover More
Macros depend on the use of variables to do their work. This tip examines how variables are declared in a macro, using ...Discover More
A common task for macros is to open and process a file you want imported into your workbook. If you need to identify the ...Discover More
FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.