Skip to content

Latest commit

 

History

History
58 lines (36 loc) · 1.27 KB

Excel.Application.Cursor.md

File metadata and controls

58 lines (36 loc) · 1.27 KB
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
Application.Cursor property (Excel)
vbaxl10.chm133099
vbaxl10.chm133099
Excel.Application.Cursor
5137b89d-aba9-3e5f-b6c4-cd2264a7bd7f
04/04/2019
medium

Application.Cursor property (Excel)

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

Syntax

expression.Cursor

expression A variable that represents an Application object.

Remarks

XlMousePointer can be one of these 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.

Example

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

[!includeSupport and feedback]