Private Sub Command1_Click()
HT = Val(Text2)
PH = Val(Text3)
salario = HT * PH
Text4
= salario
Descuento
= 0.2 * Text4
Text5
= Descuento
SalarioNeto
= SalarioBruto - Descuento
Text6
= SalarioNeto
End
Sub
Private Sub Command2_Click()
Text1 = ""
Text2 = ""
Text3 = ""
Text4 = ""
Text5 = ""
Text6 = ""
End Sub
Private Sub Command3_Click()
Beep
End
End
Sub
Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
If Text1.Text = "" Then
MsgBox
("digite el nombre del trabajador")
Text1.SetFocus
Else
Text2.SetFocus
End If
End
If
End
Sub
Private Sub Text2_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
If Text2.Text = "" Then
MsgBox
("digite el numero de horas trabajadas")
Text2.SetFocus
Else
Text3.SetFocus
End If
End
If
End
Sub
Private Sub Text3_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
If Text3.Text = "" Then
MsgBox
("digite el pago por horas")
Text3.SetFocus
Else
Text4.SetFocus
End If
End
If
End
Sub
Private Sub Text4_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
If Text4.Text = "" Then
MsgBox
("digite el salario bruto")
Text4.SetFocus
Else
Text5.SetFocus
End If
End
If
End
Sub
Private Sub Text5_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
If Text5.Text = "" Then
MsgBox
("digite el descuento")
Text5.SetFocus
Else
Text6.SetFocus
End If
End If
End
Sub
Private Sub Text6_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
If Text6.Text = "" Then
MsgBox
("digite el salario neto")
Text6.SetFocus
Else
Command1.SetFocus
End If
End
If
End
Sub