Walk Lightly on this PLANET and yet leave such a FOOTPRINT that cannot be erased for thousands of Years..!!!
Visit Codstech for Cyber Security related Posts !

Visitors

Sunday, July 31, 2011

VB- 76 : Calculate Income Tax

Create a VB program to calculate the income tax.User will put his Annual Income in the box and by clicking on "Income Tax" button, message box will show his income tax according to the following rule :

Rs
Tax
0 – 50,000
No Tax
50,000 – 60,000
10% of Annual Income
60,000 – 1,50,000
20% of Annual Income
More than 1,50,000
30% of Annual Income


Refer Pay Slip of an Employee , Calculate the Gross & Net Salary of an Employee also



(A)Program Design : 



(B) Property(Controls Used) :
  • 2 Labels
  • TextBox  (Text1-To get Annual Income from the user)
  • One Command Button
  • TextBox (Text2-To show the Income Tax)

(C) Attaching Code to the Object :



Private Sub Command1_Click()
Dim AI As Double
AI = Val(Text1)
If AI > 0 And AI < 50000 Then
Text2 = "No Tax"
Else
If AI > 50000 And AI < 60000 Then
Text2 = AI * 0.1
Else
If AI > 60000 And AI < 150000 Then
Text2 = AI * 0.2
Else
If AI > 150000 Then
Text2 = AI * 0.3
End If
End If
End If
End If
End Sub

(D) Output :


(E) Errors :
If found any errors while running your VB program, please click this link   Possible Errors while running VB Programs to get a solution.