» Display a message on the statusbar using VBA in Microsoft Excel
VBA macro tip contributed by Erlandsen Data Consulting offering Microsoft Excel Application development, template customization, support and training solutions
CATEGORY - Menus, Toolbars, Status bar in VBA
VERSION - All Microsoft Excel Versions
the user may think that the computer has stopped to respond. Because of this it's a good programming
rule to inform the user of the macro progress by displaying a message on the statusbar at the bottom of the screen.
Here is an example :
Sub StatusBarExample()
Application.ScreenUpdating = False
' turns off screen updating
Application.DisplayStatusBar = True
' makes sure that the statusbar is visible
Application.StatusBar = "Please wait while performing task 1..."
' add some code for task 1 that replaces the next sentence
Application.Wait Now + TimeValue("00:00:02")
Application.StatusBar = "Please wait while performing task 2..."
' add some code for task 2 that replaces the next sentence
Application.Wait Now + TimeValue("00:00:02")
Application.StatusBar = False
' gives control of the statusbar back to the programme
End Sub
Book Store:
Recommended Books:
- Accounting and Financial Fundamentals for Nonfinancial Executives
- The One Page Business Plan: Start With a Vision, Build a Company!
- The Basics of Finance: Financial Tools for Non Financial Managers
- Writing Excel Macros with VBA, 2nd Edition
- Windows XP All-in-One Desk Reference For Dummies
- H&R Block's Just Plain Smart(tm) Tax Planning Advisor: A year-round approach to lowering your taxes this year, next year and beyond
No comments have been submitted.

