Sub ajoutBouton()
Dim Shp As Shape
On Error Resume Next
Feuil1.Shapes("oBtn").Delete
With Cells(1600 / 160).Offset(16) '-< adapter (c'était juste pour le clin d'oeil ;))
Set Shp = _
Feuil1.Shapes.AddFormControl(Type:=0, Left:=.Left, Top:=.Top, Width:=.Width, Height:=.Height)
End With
With Shp
.Name = "oBtn"
.OnAction = "Test"
With .TextFrame.Characters
.Caption = "Cliquez!"
With .Font
.Name = "Calibri": .FontStyle = "Regular": .Size = 10
End With
End With
End With
End Sub
Sub Test()
MsgBox "Nous sommes le : " & Date, vbInformation, "Bonjour, " & Application.UserName
End Sub