Programacion visual basic
Dim Total As Double
Dim Subtotal As Double
Dim Mh As Integer
Dim Gh As Integer
Dim Mp As Integer
Dim Gp As Integer
Dim Mj As Integer
Dim Gj As Integer
DimSuma As Integer
Const CoMhawai = 75
Const CoGhawai = 100
Const CoMpepper = 100
Const CoGpepper = 125
Const CoMjamon = 50
Const CoGjamon = 75
Subtotal = 0
If ChkMhawai.Value = 1 Then
IfIsNumeric(TxtMhawai) Then
Subtotal = Subtotal + CoMhawai * Val(TxtMhawai)
Else
MsgBox "Ingrese un valor válido para el tipo Hawaiana"
TxtMhawai = ""TxtMhawai.SetFocus
End If
End If
If ChkGhawai.Value = 1 Then
If IsNumeric(TxtGhawai) Then
Subtotal = Subtotal + CoGhawai * Val(TxtGhawai)
Else
MsgBox "Ingrese un valorválido para el tipo Hawaiana"
TxtGhawai = ""
TxtGhawai.SetFocus
End If
End If
If ChkMpepper.Value = 1 Then
If IsNumeric(TxtMpepper) Then
Subtotal = Subtotal +CoMpepper * Val(TxtMpepper)
Else
MsgBox "Ingrese un valor válido para el tipo Pepperoni"
TxtMpepper = ""
TxtMpepper.SetFocus
End If
End If
If ChkGpepper.Value= 1 Then
If IsNumeric(TxtGpepper) Then
Subtotal = Subtotal + CoGpepper * Val(TxtGpepper)
Else
MsgBox "Ingrese un valor valido para el tipo Pepperoni"
TxtGpepper =""
TxtGpepper.SetFocus
End If
End If
If ChkMjamon.Value = 1 Then
If IsNumeric(TxtMjamon) Then
Subtotal = Subtotal + CoMjamon * Val(TxtMjamon)
Else
MsgBox"Ingrese un valor valido para el tipo Jamon y Queso"
TxtMjamon = ""
TxtMjamon.SetFocus
End If
End If
If ChkGjamon.Value = 1 Then
If IsNumeric(TxtGjamon) ThenSubtotal = Subtotal + CoGjamon * Val(TxtGjamon)
Else
MsgBox "Ingrese un valor valido para el tipo Jamon y Queso"
TxtGjamon = ""
TxtGjamon.SetFocus
End If
End...
Regístrate para leer el documento completo.