Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, 2013, 2016, 2019, Excel in Microsoft 365, and 2021. 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.

Using the Status Bar

Written by Allen Wyatt (last updated June 11, 2022)
This tip applies to Excel 2007, 2010, 2013, 2016, 2019, Excel in Microsoft 365, and 2021


1

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.

Note:

If you would like to know how to use the macros described on this page (or on any other page on the ExcelTips sites), I've prepared a special page that includes helpful information. Click here to open that special page in a new browser tab.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (12319) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, Excel in Microsoft 365, and 2021. You can find a version of this tip for the older menu interface of Excel here: Using the Status Bar.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Keep with Previous

Word allows you to format a paragraph so that it is on the same page as whatever paragraph follows it. You may want, ...

Discover More

Printing More than One Copy

If you need to print more than one copy of your document, you need to become familiar with the options in the Print ...

Discover More

Replacing with Plain Text

When using Find and Replace, how your replacements are formatted will depend on how the text being replaced is formatted. ...

Discover More

Save Time and Supercharge Excel! Automate virtually any routine task and save yourself hours, days, maybe even weeks. Then, learn how to make Excel do things you thought were simply impossible! Mastering advanced Excel macros has never been easier. Check out Excel 2010 VBA and Macros today!

More ExcelTips (ribbon)

Jumping to the Start of the Next Data Entry Row

Want a quick way to jump to the end of your data entry area in a worksheet? The macro in this tip makes quick work of the ...

Discover More

Maximum Length Limit for a Macro

Make your macros too long, and Excel may just refuse to run them at all. This tip explains what the limit is for macros ...

Discover More

Adjusting Values with Formulas

Paste Special is a great tool that allows you to modify the values in a range of cells in your worksheets. You may want, ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is 8 - 5?

2022-06-11 10:37:10

J. Woolley

If Application.DisplayStatusBar is False, you will not see anything written to the status bar. Therefore, the proper way to use the status bar is illustrated in this example from Microsoft:

oldStatusBar = Application.DisplayStatusBar
Application.DisplayStatusBar = True
Application.StatusBar = "Please be patient..."
Workbooks.Open filename:="LARGE.XLS"
Application.StatusBar = False
Application.DisplayStatusBar = oldStatusBar

See https://docs.microsoft.com/en-us/office/vba/api/excel.application.statusbar


This Site

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.

Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.