L
leungkong
I have used below code to add a button when workbook open.
I want to remove it when work close.
But the button name is "Button 1".
How can I change the name when I create the button? Thanks.
Worksheets("MIRO").Buttons.Add(240, 15, 80, 16).Select
With Selection
.OnAction = "break"
.Characters.Text = "Break"
End With
With Selection.Characters(Start:=1, Length:=8).Font
.Name = "Arial"
.FontStyle = "Regular"
.Size = 10
.ColorIndex = xlAutomatic
End With
I want to remove it when work close.
But the button name is "Button 1".
How can I change the name when I create the button? Thanks.
Worksheets("MIRO").Buttons.Add(240, 15, 80, 16).Select
With Selection
.OnAction = "break"
.Characters.Text = "Break"
End With
With Selection.Characters(Start:=1, Length:=8).Font
.Name = "Arial"
.FontStyle = "Regular"
.Size = 10
.ColorIndex = xlAutomatic
End With