Private Type POINTAPI
x As Long
y As Long
End Type
Private Declare Function GetCursorPos Lib "user32" _
(lpPoint As POINTAPI) As Long
Private MoP As POINTAPI
Sub MyPoints()
Dim Stt, Ntt
Application.DisplayStatusBar = True
Stt = Time
Do
DoEvents
GetCursorPos MoP
Application.StatusBar = _
"マウス座標 X=" & MoP.x & " Y=" & MoP.y
Ntt = Time
Loop While Ntt < Stt + TimeValue("00:00:05")
With Application
.StatusBar = False
.DisplayStatusBar = False
End With
End Sub