CODE
Dim pay As String
pay = incomebx.Text
Dim taxpr As Double
If btnsingle.Checked = True Then
If pay = 0 <= 102 Then
taxpr = 0
ElseIf pay = 103 <= 373 Then
taxpr = 0.1
ElseIf pay = 374 <= 1185 Then
taxpr = 0.15
ElseIf pay = 1186 <= 2635 Then
taxpr = 0.25
ElseIf pay = 2636 <= 5719 Then
taxpr = 0.28
ElseIf pay = 5720 <= 12354 Then
taxpr = 0.33
Else
taxpr = 0.35
End If
Else
If pay = 0 <= 308 Then
taxpr = 0
ElseIf pay = 309 <= 858 Then
taxpr = 0.1
ElseIf pay = 859 <= 2490 Then
taxpr = 0.15
ElseIf pay = 2491 <= 4540 Then
taxpr = 0.25
ElseIf pay = 4541 <= 7137 Then
taxpr = 0.28
ElseIf pay = 7138 <= 12542 Then
taxpr = 0.33
Else
taxpr = 0.35
End If
End If
' Declare double for tax withheld and cal. tax
Dim taxs As Double
taxs = pay * taxpr
'Cal bring home pay and display
takepay.Text = pay + taxs
End Sub
pay = incomebx.Text
Dim taxpr As Double
If btnsingle.Checked = True Then
If pay = 0 <= 102 Then
taxpr = 0
ElseIf pay = 103 <= 373 Then
taxpr = 0.1
ElseIf pay = 374 <= 1185 Then
taxpr = 0.15
ElseIf pay = 1186 <= 2635 Then
taxpr = 0.25
ElseIf pay = 2636 <= 5719 Then
taxpr = 0.28
ElseIf pay = 5720 <= 12354 Then
taxpr = 0.33
Else
taxpr = 0.35
End If
Else
If pay = 0 <= 308 Then
taxpr = 0
ElseIf pay = 309 <= 858 Then
taxpr = 0.1
ElseIf pay = 859 <= 2490 Then
taxpr = 0.15
ElseIf pay = 2491 <= 4540 Then
taxpr = 0.25
ElseIf pay = 4541 <= 7137 Then
taxpr = 0.28
ElseIf pay = 7138 <= 12542 Then
taxpr = 0.33
Else
taxpr = 0.35
End If
End If
' Declare double for tax withheld and cal. tax
Dim taxs As Double
taxs = pay * taxpr
'Cal bring home pay and display
takepay.Text = pay + taxs
End Sub
