Option Explicit
Private Declare Function LoadCursorFromFile Lib _
"user32" Alias "LoadCursorFromFileA" _
(ByVal lpFileName As String) As Long
Private Declare Function SetCursor Lib "user32" _
(ByVal hCursor As Long) As Long
Private Declare Function DestroyCursor Lib "user32" _
(ByVal hCursor As Long) As Long
Dim hwndCursor As Long
Private Sub UserForm_MouseMove(ByVal Button As Integer, _
ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
hwndCursor = LoadCursorFromFile("C:\dossier\fichier.ani")
If hwndCursor > 0 Then
SetCursor hwndCursor
DestroyCursor hwndCursor
End If
End Sub
Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
DestroyCursor hwndCursor
End Sub