VBA Change CursorTo VBA change cursor in an application, you have the Application.Cursor property. (To change the cursor on a UserForm, see below) For the shape of the cursor, you have the choice of... xlDefaultHere is an example for changing the cursor to an hourglass for the duration that the code is looping... Sub vba_change_cursor() End Sub VBA change cursor on a UserFormOn a UserForm, and subsequently, when hovering over the controls on the form, you have the choice of 15 cursor shapes...To see them all, go to the View menu in the VBA IDE (VBA Editor) and click on Object Browser. Then, type fmMousePointer in the find box and click on the binoculars as in the figure below. When you click on each cursor, you can see its numerical value at the bottom of the list. In the image, you can see that the numerical value of the default cursor is 0. you can use the numerical value instead of the keyword in your code if you please. This
site is powered by Site Build It!. If you enjoy it, please check out
the Custom
Search
Return from VBA Change Cursor to VBA Code Samples
|