Hello all, i would like you to answer me a question:

I have a Select case statement:

Select Case textbox1.text

and i want to add more than one case,for example:

Select Case textbox1.text and checkbox1.checked

is it possible in any way to do this with VB.NET???


Thanks in advance,
Alex

yes but how can i do this? could you post an example of that.....

Thanks

I don't think it is possible. Do something like this:

Select Case textbox1.text
            Case "case1"
                If CheckBox1.Checked Then
                    'code
                Else
                    'code
                End If
            Case "case2"
                If CheckBox1.Checked Then
                    'code
                Else
                    'code
                End If
            Case Else
                MessageBox.Show("none of the above")
        End Select

Select Case textbox1.text
Case "case1"
If CheckBox1.Checked Then
'Your code
Else
'Your code
End If
Case "case2"
If CheckBox1.Checked Then
'Your code
Else
'Your code
End If
Case Else
MessageBox.Show("Default")
End Select

This article has been dead for over six months. Start a new discussion instead.