Dans General Declaration :
Private Declare Function GetCursorPos Lib "user32" Alias "GetCursorPos" (lpPoint As POINTAPI) As Long
Private Type POINTAPI
x as Long
y as Long
End Type
Dans le Code :
Dim Pos as pointApi
GetCursorPos Pos
' Pour avoir x et y en Pixel :
x = Pos.x
y = Pos.y