Question

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
Was it helpful?

Solution

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
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top