Hi Ken,
I've tried that, but it didn't work. Here is my code:
Private Sub txtProductgrp_SelectedIndexChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
txtProductgrp.SelectedIndexChanged
Dim i As Integer
Dim selected As Integer
selected = 0
For i = 0 To (txtProductgrp.Items.Count() - 1)
If txtProductgrp.Items(i).Selected = True Then
selected = 1
End If
Next
If selected = 1 Then
txtSubject.Enabled = True
txtProduct1.enabled = True
Else
txtSubject.Enabled = False
txtProduct1.enabled = False
End If
End Sub
There are only 2 checkboxes, you can select them both or just one, but at
least if one of them is selected people should be able to modify txtSubject
and txtProduct1.
Thanks for you reply.
Regards,
Edward
Op Wed, 12 Jan 2005 09:07:12 -0500 schreef Ken Tucker [MVP]:
[quoted text, click to view] > Hi,
>
> Write code in the checkboxes checkedchange event to enable or
> disable the other checkboxes.
>
>
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemwindowsformscheckboxclasscheckedchangedtopic.asp
>
> Ken
> -----------------
> "Edward van Nijmweegen" <e_van_nijmweegen@hotmail.com> wrote in message
> news:c88znl4trw7g.lir5idil91a7.dlg@40tude.net...
> Hello,
>
> I'm working in VB.net and want to take actions after someone selected one
> of the checkbox items.
>
> I've 2 checkboxes, and some fiedls that are disabled. If a person select
> checkbox 1 some of the other fields should be enabled. If the user select
> checkbox 2, other fields should be enabled.
>
> The two checkboxes are grouped.
>
> Thanks for the help,
>
> Regards,
>
> Edward
--