You are on page 1of 3

Private Function MAYUSCULA(V As Integer) As Boolean

If V >= 65 And V <= 90 Then


MAYUSCULA = True
Else
MAYUSCULA = False
End If
End Function

Private Function MINUSCULA(V As Integer) As Boolean


If V >= 97 And V <= 122 Then
MINUSCULA = True
Else
MINUSCULA = False
End If
End Function

Private Function LETRA(V As Integer) As Boolean


If V >= 65 And V <= 90 Or V >= 97 And V <= 122 Then
LETRA = True
Else
LETRA = False
End If
End Function

Private Function NUMERO(V As Integer) As Boolean


If V >= 48 And V <= 57 Then
NUMERO = True
Else
NUMERO = False
End If
End Function

Private Sub TextCod_Change()


If TextApell = "" Or TextLOC = "" Or TextNAC = "" Or TextINT = "" Then
CmdEVALUAR.Enabled = False
CmdNUEVO.Enabled = False
Else
CmdEVALUAR.Enabled = True
CmdNUEVO.Enabled = True
End If
End Sub

Private Sub TextINT_Change()


If TextApell = "" Or TextLOC = "" Or TextNAC = "" Or TextINT = "" Then
CmdEVALUAR.Enabled = False
CmdNUEVO.Enabled = False
Else
CmdEVALUAR.Enabled = True
CmdNUEVO.Enabled = True
End If
End Sub
Private Sub TextApell_KeyPress(KeyAscii As Integer)
If NUMERO(KeyAscii) Then
R1 = MsgBox("Ingrese solo LETRAS", 16, "ERROR")
KeyAscii = 0
End If
End Sub

Private Sub TextLOC_KeyPress(KeyAscii As Integer)


If LETRA(KeyAscii) Then
R1 = MsgBox("Ingrese solo NUMEROS", 16, "ERROR")
KeyAscii = 0
End If
End Sub

Private Sub TextNAC_KeyPress(KeyAscii As Integer)


If LETRA(KeyAscii) Then
R1 = MsgBox("Ingrese solo NUMEROS", 16, "ERROR")
KeyAscii = 0
End If
End Sub

Private Sub TextINT_KeyPress(KeyAscii As Integer)


If LETRA(KeyAscii) Then
R1 = MsgBox("Ingrese solo NUMEROS", 16, "ERROR")
KeyAscii = 0
End If
End Sub

Private Sub Cmdevaluar_Click()


Textsexo.Locked = True
AREA = Val(InputBox("pertenece al area de:" + Chr(13) + "Planificacion (p)" + Chr(13) +
"Logistica (l)" + Chr(13) + "Operaciones (O)" + Chr(13) + " Control (c)", "AREA DE TRABAJO",
AREA))
Dim CASO As Single
If Textsexo = "M" Then
CASO = M
End If
If Textsexo = "F" Then
CASO = F
End If
Select Case CASO
Case M
If AREA = p Then
Sueldo = 1856 * 0.94
End If
If AREA = l Then
Sueldo = 2671 - 2671 * 0.04
End If
If AREA = o Then
Sueldo = 3176 - 3176 * 0.07
End If
If AREA = c Then
Sueldo = 2780 - 2780 * 0.085
End If
Case F
If AREA = p Then
Sueldo = 1473 - 1473 * 0.06
End If
If AREA = l Then
Sueldo = 2100 - 2100 * 0.04
End If
If AREA = o Then
Sueldo = 2980 - 2980 * 0.07
End If
If AREA = c Then
Sueldo = 2210 - 2210 * 0.085
End If
End Select
Textpago = Val(Sueldo)
mayus = UCase(Textapellido)
Text3 = mayus
End Sub
Private Sub Cmdotro_Click()
CmbArea.Text = "< su area es >"
Optmas.Value = False
Optfem.Value = False
Textapell = "": TextSr = "": Label2 = ""
Textapell.SetFocus
End Sub

Private Sub CmdSalir_Click()


R = MsgBox("SALIR?", 4 + 32, "MENU SALIR")
If R = 6 Then
End
End If
End Sub

You might also like