Doflamingo
Board Regular
- Joined
- Apr 16, 2019
- Messages
- 238
Hi all,
I try to understand why my code to clear option button does not work.
I know how to clear listbox or textbox from userform, code below
But from various optionbuttons in frame, it does not work
Here I have 2 frames, with 4 option button in the 1st frame and 11 optionbutton in the 2nd frame
The code to clean optionbutton below does not work. I have not renamed them, they are called optionbutton1, optionbutton2 etc...until optionbutton15. Same thing for the frame: Frame1, Frame 2
Any idea ?
I try to understand why my code to clear option button does not work.
I know how to clear listbox or textbox from userform, code below
Code:
ListBox2.Clear
TextBox1 = ""
But from various optionbuttons in frame, it does not work
Here I have 2 frames, with 4 option button in the 1st frame and 11 optionbutton in the 2nd frame
The code to clean optionbutton below does not work. I have not renamed them, they are called optionbutton1, optionbutton2 etc...until optionbutton15. Same thing for the frame: Frame1, Frame 2
Code:
For i = 1 To 2
For Each c In Controls("Optionbutton" & Format(i, "00")).Controls
c.Value = False
Next c
Next i
Any idea ?