Gopalakrishnan
Board Regular
- Joined
- Feb 19, 2013
- Messages
- 110
Hi..
I'm trying to use 5 check boxes and 2 radio controls depending on the check box values. My requirement is to enable those 2 radio controls when the check boxes 3-5 are checked. I've written the code below which partially fulfills my requirement, i.e., it's enabling the radio controls when I check & uncheck the check boxes individually. But when I'm trying to do multiple selection & deselection, it doesn't work as expected.
Problem I'm facing is here - If I select the check boxes 3, 4, and 5 together then the radio controls get enabled as expected. But when I deselect anyone check box, for instance 3, radio controls get disabled unexpectedly where I'm expecting the code to not disable the control since other two are got selected.
Hope that I've given clear detail about my requirement which is definitely an easier task to forum experts.
Please help me in sorting out it, I've tried to get sample code for check boxes with similar type of usage from forum and out of forum too. But I couldn't find related thread anywhere, so please do the required!
Thanks for your time and any help you can do!
P.S: I'm using ActiveX controls
~~ Gopi
I'm trying to use 5 check boxes and 2 radio controls depending on the check box values. My requirement is to enable those 2 radio controls when the check boxes 3-5 are checked. I've written the code below which partially fulfills my requirement, i.e., it's enabling the radio controls when I check & uncheck the check boxes individually. But when I'm trying to do multiple selection & deselection, it doesn't work as expected.
Code:
Private Sub EstFor_Ch3_Click()
If EstFor_Ch3.Value = True Then
IQScr_OP1.Enabled = True
IQScr_OP2.Enabled = True
SysTS_OP1.Enabled = True
SysTS_OP2.Enabled = True
Else
IQScr_OP1.Enabled = False
IQScr_OP2.Enabled = False
SysTS_OP1.Enabled = False
SysTS_OP2.Enabled = False
End If
End Sub
*** repeated the same for Check Box 4 & 5 as well!
Problem I'm facing is here - If I select the check boxes 3, 4, and 5 together then the radio controls get enabled as expected. But when I deselect anyone check box, for instance 3, radio controls get disabled unexpectedly where I'm expecting the code to not disable the control since other two are got selected.
Hope that I've given clear detail about my requirement which is definitely an easier task to forum experts.
Please help me in sorting out it, I've tried to get sample code for check boxes with similar type of usage from forum and out of forum too. But I couldn't find related thread anywhere, so please do the required!
Thanks for your time and any help you can do!
P.S: I'm using ActiveX controls
~~ Gopi
Last edited: