Private Sub Command1_Click()
If Val(Text1.Text) >= 100 And Val(Text1.Text) < 1000 Then
Label2.Caption = "Tem desconto de 5%. E custa: " & Val(Text1.Text) * 1500 * 0.05 & "€"
ElseIf Val(Text1.Text) >= 1000 Then
Label2.Caption = "Tem desconto de 8%. E custa: " & Val(Text1.Text) * 1500 * 0.08 & "€"
Else
Label2.Caption = "Não tem desconto. E custa: " & Val(Text1.Text) * 1500 & "€"
End If
End Sub
Private Sub Command2_Click()
End
End Sub

Sem comentários:
Enviar um comentário