Hello guys!
I have a userform with a certain number of options from which the user has to choose one. However, he can also add more, so I created more optionbuttons with no caption and set their visibility to False. If the user wants to add a new option button, he clicks a button that opens a text box where he writes the name of the new optionbutton and, with the following code, the option button appears with the new name.
novo_desenho.OptionButton54.Visible = True
novo_desenho.OptionButton54.Caption = TextBox1.value
The problem is that when I close the userform, the Option Button hides again and has no name saved. I can make it work by doing this the following:
If Not IsEmpty(ActiveSheet.cell("P5")) Then
'novo_desenho.OptionButton54.Visible = True
'novo_desenho.OptionButton54.Caption = TextBox1.value
'End If
...but it's not efficient to make excel test this condition for 10 or 20 cells. Isn't there a way to make it save the changes permanently??
Thanks,
Hugo
Bookmarks