Click en la imagen para ver el tema y el taller
Código del Botón Aceptar
Private Sub CommandButton1_Click()
Dim Zona As String, CalendarioE As String, NroMatricula As Integer
Dim Descuento As Currency, VlrMatricula As Currency, NetoP As Currency
If Not Len(TextBox1) = 5 Then
MsgBox "El código debe ser de 5 caracteres", vbInformation, "Error"
Exit Sub
End If
Zona = UCase(Left(TextBox1, 1))
Select Case Zona
Case "N"
MsgBox "Estudiante de zona Norte!", vbInformation, "OK"
Case "C"
MsgBox "Estudiante de Centro Norte!", vbInformation, "OK"
Case "S"
MsgBox "Estudiante de Sur Norte!", vbInformation, "OK"
Case Else
MsgBox "Primer caracter debe ser N, C ó S", vbInformation, "Error"
Exit Sub
End Select
CalendarioE = UCase(Mid(TextBox1, 2, 1))
Select Case CalendarioE
Case "A"
MsgBox "Estudiante de calendario A!", vbInformation, "OK"
Case "B"
MsgBox "Estudiante de Calendario B!", vbInformation, "OK"
Case Else
MsgBox "EL segundo caracter debe ser A ó B", vbInformation, "Error"
Exit Sub
End Select
If IsNumeric(Right(TextBox1, 3)) Then
NroMatricula = Right(TextBox1, 3)
Else
MsgBox "Los 3 ultimos caracteres deben ser nros", vbInformation, "Error"
Exit Sub
End If
If Not IsNumeric(TextBox3) Then
MsgBox "El valor matricula debe ser un numero", vbExclamation, "ERROR"
Exit Sub
End If
'==================================================
'programar descuento y el neto a pagar
'==================================================
End Sub
No hay comentarios:
Publicar un comentario