- Gross Salary=Basic+HRA+DA+City Allowance-Professional Tax
- Net Salary=Gross Salary-P.F
A) Program Design :
(B) Property(Controls Used) :
- 11 Labels
- 10 Text Boxes (The Index Property of the 1st 6 text boxes should be from 0 to 5 respectively,,,Text Property of text boxes for entering Employee name & number should be kept as blank and all others are Zero,,,The Locked Property of the text boxes (For calculating Gross & Net Salary) should be kept as True
- One Command Button (Caption is Calculate)
(C) Attaching Code to the Object :
Private Sub Command1_Click() Dim sum As Integer If Text1.Text = "" Or Text2.Text = "" Then MsgBox "Enter Employee Number and Name" End If For i = 2 To 5 sum = sum + Val(Text1(i).Text) Next sum = sum - Val(Text7.Text) Text9 = sum Text10 = sum - Val(Text8.Text) End Sub |
Possible Error :Method or Data Member not Found
====================================================================
No comments:
Post a Comment