Detail of Form :-
- Select Two form
- Select 8 Text Box for Bill number, Name, Price Quantity, Discount Percent, Total, Discount, and Final Payment.
- Select Two Button first for Calculate and Second for Exit.
Code For Bill :-
Private Sub Command1_Click()
Dim bill, n, p, q, t, dp, d, pay As Integer
bill = Text1.Text
n = Text2.Text
p = Text3.Text
q = Text4.Text
t = p * q
Text5.Text = t
dp = Text8.Text
d = t * dp / 100
Text6.Text = d
pay = t - d
Text7.Text = pay
End Sub
Private Sub Command2_Click()
Form1.Show
Form2.Hide
End Sub
Dim bill, n, p, q, t, dp, d, pay As Integer
bill = Text1.Text
n = Text2.Text
p = Text3.Text
q = Text4.Text
t = p * q
Text5.Text = t
dp = Text8.Text
d = t * dp / 100
Text6.Text = d
pay = t - d
Text7.Text = pay
End Sub
Private Sub Command2_Click()
Form1.Show
Form2.Hide
End Sub
No comments:
Post a Comment