DISEÑO FINALIZADO
VISTA DEL DISEÑO
PROGRAMACION
Dim A, B, C, D As Double
Private Sub CommandButton1_Click()
A = Val(Me.txtKG.Text)
If A < 1 Then
Me.txtVALOR.Text = "No se aceptan encomiendas con peso menores a 1Kg"
Else
If A < 10 Then
Me.txtVALOR.Text = "12"
Else
If A >= 10 And A < 30 Then
B = 0.75 * (A - 10)
Me.txtVALOR.Text = 12 + B
Else
If A >= 30 And A < 50 Then
C = 0.8 * (A - 30)
Me.txtVALOR.Text = 34 + C
Else
If A >= 50 Then
D = 0.85 * (A - 50)
Me.txtVALOR.Text = 60 + D
End If
End If
End If
End If
End If
End Sub
Private Sub CommandButton2_Click()
Me.txtKG.Text = ""
Me.txtVALOR.Text = ""
End Sub


No hay comentarios.:
Publicar un comentario