vbi-9

Private Sub Command1_Click()
Dim h As Single
Dim r, n, o As Currency
h = Val(Text2.Text)
r = Val(Text3.Text)
If h > 48 Then
    n = 48 * r
    o = (h - 48) * (r * 2)
Else
    n = h * r
    o = 0
End If
Text4.Text = n
Text5.Text = o
End Sub

VBO 9.PNG

Advertisements