Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Expand Minimize

Application.Cursor Property (Excel)

Returns or sets the appearance of the mouse pointer in Microsoft Excel. Read/write XlMousePointer.

expression .Cursor

expression A variable that represents an Application object.

XlMousePointer can be one of these XlMousePointer constants.

xlDefault. The default pointer.

xlIBeam. The I-beam pointer.

xlNorthwestArrow. The northwest-arrow pointer.

xlWait. The hourglass pointer.

The Cursor property isn't reset automatically when the macro stops running. You should reset the pointer to xlDefault before your macro stops running.

This example changes the mouse pointer to an I-beam, pauses, and then changes it to the default pointer.

Sub ChangeCursor() 
 
 Application.Cursor = xlIBeam 
 For x = 1 To 1000 
 For y = 1 to 1000 
 Next y 
 Next x 
 Application.Cursor = xlDefault 
 
End Sub
Show:
© 2015 Microsoft