If CheckBox = True Then.. xyz

ProcalX

Member
Joined
Sep 28, 2005
Messages
7
Programming Experience
1-3
I'm reading in a RTF file that I want to search by either using WholeWord or MatchCase search options.

atm I have this:
VB.NET:
If (chkWhole.Checked = False) And (chkMatch.Checked = False) Then
            'ERROR - MUST SELECT A SEARCH OPTION
            MessageBox.Show("Select a search method", "Error")
        End If
If (chkWhole.Checked = True) Then
            rtfSearch.Find(txtSearch.Text, RichTextBoxFinds.WholeWord)
        ElseIf (chkMatch.Checked = True) Then
            rtfSearch.Find(txtSearch.Text, RichTextBoxFinds.MatchCase)
        End If

This doesn't work, nor does .value, I have also tried doing it with a combo box like: cmbSearch.SelectedValue = "Match Case" etc but that doesnt work.
 
Back
Top