Private Sub Command1_Click() Dim q As Integer Dim dis, totamt, r, payment As Single q = Val(Text1.Text) r = Val(Text3.Text) totamt = q * r Text4.Text = totamt If (totamt < 500) Then dis = 0 Text5.Text = dis payamt = totamt - dis Text6.Text = payment ElseIf (totamt > 500) And (totamt <= 800) Then dis = totamt * 0.12 Text5.Text = dis dis = totamt - dis Text6.Text = payment ElseIf (totamt > 800) And (totamt <= 1500) Then dis = totamt * 0.15 payment = totamt - dis Text5.Text = dis Text6.Text = payment Else dis = totamt * 0.2 payment = totamt - dis Text5.Text = dis Text6.Text = payment End If End Sub