View Single Post
 
Old 08-26-2022, 11:35 PM
rollis13's Avatar
rollis13 rollis13 is offline Windows 10 Office 2016
Competent Performer
 
Join Date: Jan 2021
Location: Cordenons
Posts: 143
rollis13 will become famous soon enough
Default

Sorry, did some other testing, the 'wdCursorWait' that shows up is not the function in the macro but the default cursor used by Excel to show that it's working. So, what I said in my previous post is nonsense. This will show wait cursor too.
Code:
Sub test()
    Dim a
    ' Set status bar text
    StatusBar = ("Please wait...")
    ' Turn cursor to wait
    'System.Cursor = wdCursorWait                  '<- here (note that it isn't active)
    ' My script runs here...
    Do While a < 2001
        For a = 1 To 2000
            Selection.TypeText Text:="abc"
        Next a
    Loop
    ' Turn cursor back to normal.
    StatusBar = ("Complete")
    System.Cursor = wdCursorNormal
End Sub
Reply With Quote