vb or vb.net?
We're using Visual Basic 2008 Express. Don't know what vb.net is.
vb or vb.net?
No problem Mr ChanThanks for quoting me Mr. Chan.
Ah, thanks for the replies. Now I know what to do, but how will I actually do it?
I think that is vb.netWe're using Visual Basic 2008 Express. Don't know what vb.net is.
Ah, thanks for the replies. Now I know what to do, but how will I actually do it?
Private Sub btnDone_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDone.Click
Dim num_yes As Integer
Dim num_no As Integer
If rbQ1y.Checked Then num_yes += 1 Else If rbQ1n.Checked Then num_no += 1
If rbQ2y.Checked Then num_yes += 1 Else If rbQ2n.Checked Then num_no += 1
If rbQ3y.Checked Then num_yes += 1 Else If rbQ3n.Checked Then num_no += 1
If rbQ4y.Checked Then num_yes += 1 Else If rbQ4n.Checked Then num_no += 1
If rbQ5y.Checked Then num_yes += 1 Else If rbQ5n.Checked Then num_no += 1
Dim result As String
result = IIf(num_no <= 2, "Optimist", "Pessimist")
txtResults.Text = String.Format("Yes Answers: {0}, No Answers: {1} - {2}!", num_yes, num_no, result)
End Sub