SaintAugustine
Technical User
I'm trying to make an option button rename itself when it's selected. So my question is, is there an object name for a Control? "ActiveButton" or something?
Basically, what I'm trying to do is have option buttons that say:
Do you own a dog?
* Yes * No
If the user selects Yes, an input box will pop up and say "How Many Dogs?" Then it will rename the Yes button to "Yes - 3 Dogs"
Here's what I've got:
Sub RenameSelectedButton()
Dim myNumberDogs As Integer
myNumberDogs = InputBox("How many dogs do you have?"
If myNumberDogs = "" Then End
ActiveSheet.Shapes.Select ' ???????
Selection.Characters.Text = "Yes - " & myNumberDogs & " dogs"
It would be nice if the reference was relative - ie, there's many, many option buttons like these, and I'd rather not have to go through and identify them by hand.
Thanks!
End Sub
Basically, what I'm trying to do is have option buttons that say:
Do you own a dog?
* Yes * No
If the user selects Yes, an input box will pop up and say "How Many Dogs?" Then it will rename the Yes button to "Yes - 3 Dogs"
Here's what I've got:
Sub RenameSelectedButton()
Dim myNumberDogs As Integer
myNumberDogs = InputBox("How many dogs do you have?"
If myNumberDogs = "" Then End
ActiveSheet.Shapes.Select ' ???????
Selection.Characters.Text = "Yes - " & myNumberDogs & " dogs"
It would be nice if the reference was relative - ie, there's many, many option buttons like these, and I'd rather not have to go through and identify them by hand.
Thanks!
End Sub