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

Dim mstatus As Char

Dim tax As Double

mstatus = TextBox1.Text

'tax = TextBox2.Text

If (mstatus = "1") Then

MsgBox(" Your are Single")

tax = tax + 0.05

ElseIf (mstatus = "2") Then

MsgBox("You are Married")

ElseIf (mstatus = "3") Then

MsgBox(" Yor are Head of HouseHold")

tax = tax - 0.05

ElseIf (mstatus = "s") Or (mstatus = "S") Then

MsgBox("Your are Single")

tax = tax + 0.05

ElseIf (mstatus = "m") Or (mstatus = "M") Then

MsgBox("You are Married")

ElseIf (mstatus = "h") Or (mstatus = "H") Then

MsgBox(" Yor are Head of HouseHold")

tax = tax - 0.05

Else

MsgBox("Error in entry")

End If

TextBox3.Text = tax

End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click

TextBox1.Text = ""

TextBox2.Text = ""

TextBox3.Text = ""

End Sub

End Class

 

Hosted by www.Geocities.ws

1