Waiting for answer This question has not been answered yet. You can hire a professional tutor to get the answer.

QUESTION

My code checks if the user doesn't check anything but I'm having trouble writing a code that checks to see if both boxes are checked.

msgbox that says "Please only select one Job type" ?

Here is what I have so far.

Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click

    frmNewJob.Show()

    Dim Jobtype As String = ""

    If CheckBox1.Checked Then

      JobType = "New Install"

    ElseIf CheckBox2.Checked Then

      JobType = "Removal"

    ElseIf CheckBox1.CheckState = 0 AndAlso CheckBox2.CheckState = 0 Then

      MsgBox("Please select a Job Type")

      Exit Sub

    End If

    frmNewJob.lblJobDesc.Text = ("Please use a " + frmNewJob.cboMeterType.Text + " to perform a " + JobType + " in " + lstJobLoc.SelectedItem.ToString)

  End Sub

Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question