How To Change The Mouse Cursor Icon In Your VBA Userform

Why Change Your Userform’s Cursor?
There may be certain instances where it makes sense to change the look of the mouse cursor to notify your users of a particular action. A classic case for this is when you hover over a button. Typically, your mouse cursor will change from the pointer arrow to a pointer hand.

By default, Microsoft has picked a cursor type for each control available to add to a VBA userform. However, there are steps you can take to change the cursor image that appears while interacting with these controls. Here is a list of all the available Mouse Pointers you can use within your userforms
- fmMousePointerDefault
- fmMousePointerArrow
- fmMousePointerCross
- fmMousePointerIBeam
- fmMousePointerSizeNESW
- fmMousePointerSizeNS
- fmMousePointerSizeNWSE
- fmMousePointerSizeWE
- fmMousePointerUpArrow
- fmMousePointerHourGlass
- fmMousePointerNoDrop
- fmMousePointerAppStarting
- fmMousePointerHelp
- fmMousePointerSizeAll
- fmMousePointerCustom
Most of these should be self-explanatory but if you are unsure you can always test them out to see how they appear.

You’ll notice that one very important cursor image does not appear on this list and it is the Pointed Finger (aka Hand) icon shown in the image above with the green Accept buttons. I will discuss later on in this article how you can use the fmMousePointerCustom option to load a custom cursor icon. This will allow you to use any cursor icon you want.
How To Change the Mouse Pointer
Here are the basic steps to change which mouse pointer image displays while using a specific control in your VBA userforms.
- Ensure your userform is showing in the Visual Basic Editor (keyboard shortcut Alt + F11)
- Ensure the Properties Pane is visible (keyboard shortcut F4)
- Select the userform you wish to modify
- Within the Properties Pane, find the Property called MousePointer
- Select the mouse pointer image you would like shown when you hover over the control with your cursor (fmMousePointerDefault is the default option)

Using A Custom Mouse Pointer
I you do not find any of the built-in mouse pointers suitable for your userform you also have the option to upload your own cursor icon. The steps to do this are as follows:
- Ensure your userform is showing in the Visual Basic Editor (keyboard shortcut Alt + F11)
- Ensure the Properties Pane is visible (keyboard shortcut F4)
- Select the userform you wish to modify
- Within the Properties Pane, find the Property called MousePointer and change it to the fmMousePointerCustom option
- Also within the Properties Pane, find the Property called MouseIcon and click the little gray box with three black dots that appear on the far right of the property
- Find the icon image you would like to appear (file type must be .ico or .cur)

Where Do You Find The Hand Icon on The Web?
I had spent years trying to find a quality hand icon that would be compatible with Microsoft’s userforms. I dug through forums, articles, and everything in between but could only find pixelated hand icons that did not look like the current native hand cursor the Windows OS typically uses.
About a year ago I finally found a file download that matched the quality I was looking for. I don’t have the slightest clue where I found it but I made sure to save several copies so I would never have to find it again. With this article, I also want to save you the pain of having to search for this gem.

Here is a direct link to download this cursor icon: Hand Cursor.ico

After 10+ years of creating macros and developing add-ins, I've compiled all the hacks I wish I had known years ago!

Keep Learning
Chris Newman
Chris is a finance professional and Excel MVP recognized by Microsoft since 2016. With his expertise, he founded TheSpreadsheetGuru blog to help fellow Excel users, where he shares his vast creative solutions & expertise. In addition, he has developed over 7 widely-used Excel Add-ins that have been embraced by individuals and companies worldwide.