Does `Application.StatusBar` work in office 2011?

2k views Asked by At

I wrote this little macro on my mac using office 2011. I don't see any status bar. Anyone know why this is not working?

Sub testStastusBar()

    Application.DisplayStatusBar = True
    Application.StatusBar = "Now processing...."

    Dim n As Integer
    For n = 1 To 10
        Application.Wait (Now + TimeValue("0:00:01"))
        Debug.Print n
    Next n

    Application.StatusBar = False

End Sub
1

There are 1 answers

0
Siddharth Rout On BEST ANSWER

To make it work with Excel 2011, add DoEvents after updating the statusbar.

Sub testStastusBar()

    Application.DisplayStatusBar = True
    Application.StatusBar = "Now processing...."

    DoEvents '<~~ Add This

    Dim n As Integer
    For n = 1 To 10
        Application.Wait (Now + TimeValue("0:00:01"))
        Debug.Print n
    Next n

    Application.StatusBar = False

End Sub