Status Bar

The StatusBar property allows you to assign a text string to be displayed at the left-hand side of the Excel status bar at the bottom of the screen. This is an easy way to keep users informed of progress during a lengthy macro operation. It is a good idea to keep users informed, particularly if you have screen updating turned off and there is no sign of activity on the screen. Even though you have turned off screen updating, you can still display messages on the status bar.

The following code shows how you can use this technique in a looping procedure:

Sub ShowMessage()

Dim lCounter As Long

For lCounter = 0 To 100000000

If lCounter Mod 1000000 = 0 Then

Application.StatusBar = "Processing Record 1

' & lCounter

End If

Next lCounter

Application.StatusBar = False

End Sub

At the end of your processing, you must set the StatusBar property to False so that it returns to normal operation. Otherwise, your last message will stay on the screen.

Was this article helpful?

0 0
The Accidental Blogging Millionaires

The Accidental Blogging Millionaires

Get Inspired By The Most Popular Bloggers Online! If You Want To Skyrocket Your Success With Business And Improve Your Overall Life You Need To Have A Look At The Accidental Blogging Millionaires! Business can be a fight, particularly when you’re trying to establish one online and like all fights, to succeed you must find the winning techniques and apply them.

Get My Free Ebook

Post a comment