lunes, 26 de septiembre de 2011

Calculo de salario neto


la siguiente es la programación:


Private Sub Command1_Click()
 Text4.Text = Text2 * Text3
 Text5.Text = Text4 * 0.2
 Text6.Text = Text4 - Text5


End Sub

Private Sub Command2_Click()
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
End Sub

Private Sub Command3_Click()
End
End Sub

Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
    If Text1.Text = "" Then
    MsgBox ("digite un nombre")
     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 un numero")
     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 un numero")
     Text3.SetFocus
  Else
  Text3.SetFocus
  End If
  End If
End Sub

No hay comentarios:

Publicar un comentario