I am writing this little appliction in VBA (Excel, office 2k3) and i have added lots of checkboxes that will fill a textbox when the value returns true. below is an example... as you can see when this box returns a value of true, it sets the value of every other checkbox to false and displays appropriate text within a textbox (that will eventually fill a row with data). what i would like to accomplish is something less code intensive, as i'll have to write this much code (and possibly more as i add more features) for every checkbox in my user form. as you can imagine this is going to be extremely time consuming. is there way to uncheck all, or maybe a range of checkboxes without this much code, something along the thought of if a checkbox value is true then all other check boxes are false? I'd love to be able to streamline this if i could, if it's possible.
Thanks in advance,
Kelethaar
Private Sub ChkBK12_Click()
If ChkBK12.Value = True Then
ChkWH355.Value = False
ChkBK181.Value = False
Chk007.Value = False
ChkPB.Value = False
ChkWH01.Value = False
ChkBK08.Value = False
ChkRD03.Value = False
ChkGreen.Value = False
ChkHaze.Value = False
Txtcoat.Text = ""
Txtcoat.Text = ChkBK12.Caption
DoEvents
End If
If ChkBK12.Value = False Then
Txtcoat.Text = ""
DoEvents
End If
End Sub
Thanks in advance,
Kelethaar
Private Sub ChkBK12_Click()
If ChkBK12.Value = True Then
ChkWH355.Value = False
ChkBK181.Value = False
Chk007.Value = False
ChkPB.Value = False
ChkWH01.Value = False
ChkBK08.Value = False
ChkRD03.Value = False
ChkGreen.Value = False
ChkHaze.Value = False
Txtcoat.Text = ""
Txtcoat.Text = ChkBK12.Caption
DoEvents
End If
If ChkBK12.Value = False Then
Txtcoat.Text = ""
DoEvents
End If
End Sub