Hi Bri,
The Name and captions are not the same.
Say you place a Forms button on a sheet, its automatic name is what
appears in the Name box on the right side of the Formula bar, eg Button
1.
The automatic caption is also Button 1.
The name can be changed by selecting the button with a right click,
clicking in the Name box, editing the name, then clicking Enter.
The caption can be changed by selecting the button with a right click,
selecting Edit text from the contextual menu, editing the text, then
clicking on the sheet.
In your code, if you need to return the caption on a button (say
button Name = Button 1) that is on the ActiveSheet, you can Dim a
String variable for storing the caption, Dim a Shape object, set the
Shape object to be the required button then reference as below..
Dim strCaption as String
Dim MyButton as Shape
Set MyButton = ActiveSheet.Shapes("Button 1")
strCaption = MyButton.TextFrame.Characters.Text
If you have a number of buttons on a sheet which all run the same macro
you might want to determine in your code which button the user pressed.
The name of that button is returned by Application.Caller eg...
If Application.Caller = "Button 1" then...
Ken Johnson