Private Sub Worksheet_SelectionChange(ByVal Target As Range) MsgBox Application.Top & vbCrLf & Application.Height & vbCrLf & " pour " & Application.Caption MsgBox ActiveWindow.Top & vbCrLf & ActiveWindow.Height & vbCrLf & " pour " & ActiveWindow.Caption MsgBox Cells(2, 1).Top & vbCrLf & Cells(2, 1).Left End Sub
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre questionPrivate Type POINTAPI X As Long Y As Long End Type Private Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As Long Private Sub Worksheet_SelectionChange(ByVal Target As Range) Dim point As POINTAPI GetCursorPos point UserForm1.Show UserForm1.Top = point.Y / 1.332 UserForm1.Left = point.X / 1.332 End Sub