Private Sub
CommandButton1_Click()
Dim VBolsa As Currency, CantBolsas As
Integer, Boni As Currency
Dim PagoProduccion As Currency, NetoPagar As
Currency
If IsNumeric(TextBox2) Then
CantBolsas =
Val(TextBox2)
Else
MsgBox
"La cantidad de bolsas debe ser un numero!", vbExclamation,
"Error"
Exit Sub
End If
If OptionButton1.Value = True Then
VBolsa = 50
ElseIf OptionButton2.Value = True Then
VBolsa = 150
ElseIf OptionButton3.Value = True Then
VBolsa = 200
Else
MsgBox
"Debe seleccionar el tipo de Bolsa!!", vbExclamation,
"Error"
Exit Sub
End If
TextBox3 = VBolsa
PagoProduccion = CantBolsas * VBolsa
TextBox4 = PagoProduccion
If CheckBox1.Value = True Then
If OptionButton5.Value = True Then
Boni = PagoProduccion * 10 / 100
ElseIf OptionButton6.Value = True Then
Boni =
PagoProduccion * 20 / 100
Else
MsgBox
"Debe seleccionar el tipo de empleado!!", vbExclamation,
"Error"
Exit Sub
End If
Else
Boni = 0
End If
TextBox5 =
Boni
NetoPagar =
PagoProduccion + Boni
TextBox6 =
NetoPagar
End Sub





