Name

form.MouseIcon [= setting]

Synopsis

Sets or returns a custom picture used as the mouse pointer. The following code displays a magnifying glass as the mouse pointer:

    Private Sub UserForm_Initialize(  )
        ' Change mouse pointer.
        Me.MousePointer = fmMousePointerCustom
        Me.MouseIcon = LoadPicture(ThisWorkbook.Path & "\magnify.ico")
    End Sub

Get Programming Excel with VBA and .NET now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.