Saturday, 18 June 2011

Customize Excel Status Bar

We can customize the application.status bar, the below example shows how we can show the clock in the status bar.


Sub StatusBarExampleX()
    Application.ScreenUpdating = False
    ' turns off screen updating
    Application.DisplayStatusBar = True
    ' makes sure that the statusbar is visible
    
    For i = 1 To 10
    Application.StatusBar = Now()
    Application.Wait Now + TimeValue("00:00:01")
    Next i
    
    Application.StatusBar = False
    ' gives control of the statusbar back to the programme
End Sub

No comments:

Post a Comment