dim x as integer 'déclare la variable x (incrément de bouton et de ligne
dim y as integer 'déclare la variable y (incrément de bouton et de ligne
With Sheets("Feuil1")
For x = 1 To 144
If .Cells(x + 1, 6).Value <> "" Then
Me.Controls("CommandButton" & x).Caption = .Cells(x + 1, 6).Value
Else
Me.Controls("CommandButton" & x).Visible = False
End If
Next x
For y = 145 To 288
If .Cells(y - 144 , 7).Value <> "" Then
Me.Controls("CommandButton" & y).Caption = .Cells(y - 144, 7).Value
Else
Me.Controls("CommandButton" & y).Visible = False
End If
Next y
End With