Private Sub Command1_Click()
Dim Units As Integer
Text1.Text = Units
If Units <= 80 Then
Cost = 7
Text2.Text = Cost
Else
End If
If Units >= 120 Then
Cost = 8.1 + 0.02 * Units > 120
Text1.Text = Units
Text2.Text = Cost
Else
End If
If Units >= 81 Then
Cost = 7 + 0.03 * (Units > 81)
Text1.Text = Units
Text2.Text = Cost
Else
End If
If Units >= 101 Then
Cost = 7.6 + 0.025 * (Units > 101)
Text1.Text = Units
Text2.Text = Cost
End If
End Sub
2007-02-02
13:10:21
·
5 answers
·
asked by
Carl Ray
1
in
Computers & Internet
➔ Programming & Design
I get 7 int the 2nd text box no matter what is in the 1st.I have two text boxes and a lable for each and one command button procedure code is in command button. What ever number i put in text box 1 should give me a result in the secon for the computation reguarding.
2007-02-02
13:13:40 ·
update #1