Hi
I have a userform and the optionbutton in it. When I click (with the mouse) on it, it becomes CHOOSEN. If I click it again, it shoud become NOT CHOOSEN, but it is not so.
How to make it?
Hi
I have a userform and the optionbutton in it. When I click (with the mouse) on it, it becomes CHOOSEN. If I click it again, it shoud become NOT CHOOSEN, but it is not so.
How to make it?
Hi olio39,
Why not use the check box instead or if you want you can paste this code in the userform.
If you double click the userform, option 1 will unselect.![]()
Private Sub UserForm_DblClick(ByVal Cancel As MSForms.ReturnBoolean) OptionButton1.Value = 0 End Sub
Corine
Hi Corinereyes
Thanks for the advise, you are right, checkbox will be the right solution for my case.
Have a nice day
If you did want to use a command button you could always use something like the following to change the caption
That way you would be able to toggle the caption on the button and then write different code depending on the button's caption![]()
Private Sub CommandButton1_Click() With CommandButton1 If .Caption = "Not Chosen" Then .Caption = "Chosen" Else .Caption = "Not Chosen" End If End With End Sub
Oops sorry ignore that, I'm not talking about option buttons at all am I?! Sorry it's early I'm still half asleep, will remember to read posts properly before replying in future.
Sorry
I think you need to use checkbox.
Regards,
Antonio
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks