Private Sub CommandButton1_Click()
Dim Ligne
Ligne = CommandButton1.TopLeftCell.Row
MsgBox Ligne
End Sub
Sub FormButton()
Dim sh As Shape, rng As Range, Ligne As Long
Set sh = ActiveSheet.Shapes(Application.Caller)
Set rng = sh.TopLeftCell
Ligne = rng.Row 'N° ligne
MsgBox Ligne 'affiche N° ligne
MsgBox rng.Address(0, 0) ' adresse cellule
End Sub
Sub FormButton()
Dim sh As Shape, rng As Range, Ligne As Long
Set sh = ActiveSheet.Shapes(Application.Caller)
Set rng = sh.TopLeftCell
ActiveSheet.Range(rng.Address(0, 0)).Select
End Sub
Private Sub CommandButton1_Click()
CommandButton1.TopLeftCell.Activate
End Sub
Sub FormButton()
ActiveSheet.Shapes(Application.Caller).TopLeftCell.Activate
End Sub