Listed below is a section of the macro I'm trying to create. This section creates a Forms Button assigned with the macro called "Import". The problem I'm having is that the default text, in this case "Button 17", is displayed on the button after the macro runs. I can't get the text to change to read "Import". The result is that every time I have my primary macro run, the name on the button changes in increments of 1 (example: the next time I run the macro, the button will be labelled Button 18, etc.).
My question is, what do I need to change in order to rename the button so it displays something other than "Button ##) on the spreadsheet after it has been created? It seems as if the Record Macro function pauses once I begin editing the Button Object, so the easy way isn't working for me.
ActiveSheet.Buttons.Add(138, 171, 252.75, 123).Select
Selection.OnAction = "Import"
ActiveSheet.Shapes("Button 17"
.Select
Selection.Characters.Text = "Import"
With Selection.Characters(Start:=1, Length:=10).Font
.Name = "times new roman"
.FontStyle = "Regular"
.Size = 10
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
End With
Range("A1"
.Select
My question is, what do I need to change in order to rename the button so it displays something other than "Button ##) on the spreadsheet after it has been created? It seems as if the Record Macro function pauses once I begin editing the Button Object, so the easy way isn't working for me.
ActiveSheet.Buttons.Add(138, 171, 252.75, 123).Select
Selection.OnAction = "Import"
ActiveSheet.Shapes("Button 17"

Selection.Characters.Text = "Import"
With Selection.Characters(Start:=1, Length:=10).Font
.Name = "times new roman"
.FontStyle = "Regular"
.Size = 10
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
End With
Range("A1"
