Let's say that I create a button on my sheet and then I give that button a name:
For example this button that I added "button 2" later is named to: Original SORT
Can I select it by the button name instead of the button shape ? in later VBA code ?
.Buttons.Add(11.25, 18, 136.5, 65.25).Select
Selection.OnAction = "SORT"
.Shapes("Button 2").Select
Selection.Characters.Text = "Original SORT"
With Selection.Characters(Start:=1, Length:=13).Font
.Name = "Arial"
.FontStyle = "Bold"
.Size = 12
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
End With
For example this button that I added "button 2" later is named to: Original SORT
Can I select it by the button name instead of the button shape ? in later VBA code ?
.Buttons.Add(11.25, 18, 136.5, 65.25).Select
Selection.OnAction = "SORT"
.Shapes("Button 2").Select
Selection.Characters.Text = "Original SORT"
With Selection.Characters(Start:=1, Length:=13).Font
.Name = "Arial"
.FontStyle = "Bold"
.Size = 12
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
End With