Article ID: 130044
Article Last Modified on 10/11/2006
xlNorthwestArrow The northwest-arrow pointer xlWait The hourglass pointer xlIBeam The I-beam pointer xlNormal The default pointerNote that when you type in the constant for the I-beam pointer, the letter that follows the "xl" prefix is an "I" (for I-beam).
Sub ChangePointer()
' Display dialog box indicating mouse pointer will change.
MsgBox "Click OK to display mouse pointer as hourglass."
' Display mouse pointer as hourglass.
Application.Cursor = xlWait
' Wait so mouse pointer change will be noticeable.
Application.Wait Now + TimeValue("0:0:03")
MsgBox "Click OK to display mouse pointer as arrow."
' Display mouse pointer as arrow
Application.Cursor = xlNorthwestArrow
' Wait so mouse pointer change will be noticeable.
Application.Wait Now + TimeValue("0:0:03")
MsgBox "Click OK to display mouse pointer as I-beam."
' Display mouse pointer as I-beam.
Application.Cursor = xlIBeam
' Wait so mouse pointer change will be noticeable.
Application.Wait Now + TimeValue("0:0:03")
MsgBox "Click OK to return mouse pointer to normal."
' Return mouse pointer to normal display.
Application.Cursor = xlNormal
End Sub
Note that because the Cursor property isn't automatically reset when the
macro stops running, you should reset the mouse pointer by setting the
Cursor property to the xlNormal value before your macro stops.
176476 OFF: Office Assistant Not Answering Visual Basic Questions
Additional query words: 8.00 97 XL97 XL
Keywords: KB130044