The information in this article applies to:
SUMMARYIn Microsoft Excel 97 and 7.0, you can use the Microsoft Visual Basic for Applications Cursor property to control the appearance of the mouse pointer while a macro is running. In earlier versions of Microsoft Excel, you do not have this ability to change the way the mouse pointer is displayed. MORE INFORMATIONMicrosoft provides programming examples for illustration only, without warranty either expressed or implied, including, but not limited to, the implied warranties of merchantability and/or fitness for a particular purpose. This article assumes that you are familiar with the programming language being demonstrated and the tools used to create and debug procedures. Microsoft support professionals can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific needs. If you have limited programming experience, you may want to contact the Microsoft fee-based consulting line at (800) 936-5200. For more information about the support options available from Microsoft, please see the following page on the World Wide Web: http://www.microsoft.com/support/supportnet/overview/overview.aspIn Microsoft Excel version 5.0, the mouse pointer is normally displayed as an hourglass when you run a macro. The exception to this is when you run a macro from a control in a custom dialog box. In this case, the mouse pointer continues to be displayed as an arrow, and does not give you an indication that the macro (event procedure) is running. In Microsoft Excel versions 7.0 and 97, you can use the Cursor property to display the mouse pointer as an arrow, an hourglass, an I-beam (displayed when editing text), and the default pointer. The following built-in constants correspond to each of the available cursor shapes:
Note 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).
Cursor Property Example
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.
REFERENCES
For more information about the Cursor property in Microsoft Excel 97, from
Q176476 OFF: Office Assistant Not Answering Visual Basic Questions Additional query words: 8.00 97 XL97
Keywords : kbdta KbVBA |
Last Reviewed: November 9, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |