May be the GetCursorPos API can help you...
Code:Option Explicit Private Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As Long Private Type POINTAPI X As Long Y As Long End Type Private pt As POINTAPI Private Sub Command1_Clink() GetCursorPos pt Debug.Print ScaleX(pt.X, vbPoints, vbTwips) & ", " & ScaleY(pt.Y, vbPoints, vbTwips) End Sub


Reply With Quote