Gross Pay

Rate of Income Tax

For first Rs65000 Nil
For next Rs10000 10% of gross pay (out of Rs65000)
For next Rs25000 15% of gross pay (out of Rs75000)
Beyond Rs100000 20% of gross pay (out of Rs100000)

Print calculated income tax on a text box?

vbi-13

Private Sub Command1_Click()
Dim gpay, x As Currency
gpay = Val(Text2.Text)
If gpay <= 65000 Then
    x = 0
ElseIf gpay <= 75000 Then
    x = (gpay - 65000) * 0.1
ElseIf gpay <= 100000 Then
    x = 10000 * 0.1 + (gpay - 75000) * 0.15
Else
    x = 10000 * 0.1 + 25000 * 0.15 + (gpay - 100000) * 0.2
End If
Text3.Text = x
End Sub

VBO 13.PNG

Advertisements