You could do it like this (you have to add the 8 radbuttons)
Private Sub RadioButton_CheckedChanged(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles rbtButton1 .CheckedChanged,
rbtButton8.CheckedChanged
Dim rad As RadioButton
btnOK.Enabled = False
For Each rad In grpChoices.Controls
If rad.Checked Then
btnOK.Enabled = True
End If
Next
End Sub
or if the button stays true after you selected something
Private Sub RadioButton_CheckedChanged(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles rbtButton1 .CheckedChanged,
rbtButton8.CheckedChanged
btnOK.Enabled = True
End Sub
"Remi Lillelien" <re**************@eunet.no> wrote in message
news:c4**********@services.kq.no...
Hello all,
Given I have a GroupBox named grpChoices, within this box i have 8
radiobuttons, named rbtButton1 through rbtButton8.
Now I would like to have a button btnOK which is enabled=false as long as
none of the radiobuttons in grpChoices are checked, and enabled=true when
the user checks one of the radiobuttons.
does anyone have an idea on how to do this, I have seached the
documentation but still no luck (then again I'm not a lucky guy)
thanks
Remi