Compara vb
'text1 boolean
If Label7.Caption = "1" Then
If Text1.Text "si" Then
MsgBox "Solo acepta valores Booleanos"
End If
End If
If Label7.Caption = "1" Then
IfText1.Text "no" Then
MsgBox "Solo acepta valores Booleanos"
End If
End If
If Label7.Caption = "1" Then
If Text1.Text "M" Then
MsgBox "Solo acepta valores Booleanos"
End If
End If
IfLabel7.Caption = "1" Then
If Text1.Text "F" Then
MsgBox "Solo acepta valores Booleanos"
End If
End If
If Label7.Caption = "1" Then
If Text1.Text "0" Then
MsgBox "Solo acepta valoresBooleanos"
End If
End If
If Label7.Caption = "1" Then
If Text1.Text "1" Then
MsgBox "Solo acepta valores Booleanos"
End If
End If
'If Label7.Caption = 3 Then
' If KeyAscii = 13 Then' KeyAscii = 0 ' Para que no "pite"
' SendKeys "{tab}" ' Envía una pulsación TAB
'ElseIf KeyAscii 8 Then ' El 8 es la tecla de borrar (backspace)
' Si después deañadirle la tecla actual no es un número...
'If Not IsNumeric("0" & Text1.Text & Chr(KeyAscii)) Then
' Corrección informada por: José Treviño (21/Sep/2001)
' If NotIsNumeric(Chr(KeyAscii)) Then
' ... se desecha esa tecla y se avisa de que no es correcta
' Beep
' KeyAscii = 0
' End If
' End If
End Sub
Private Sub Text2_LostFocus()'text2 boolean
If Label8.Caption = "1" Then
If Text2.Text "si" Then
MsgBox "Solo acepta valores Booleanos"
End If
End If
If Label8.Caption = "1" Then
If Text2.Text "no" Then
MsgBox"Solo acepta valores Booleanos"
End If
End If
If Label8.Caption = "1" Then
If Text2.Text "M" Then
MsgBox "Solo acepta valores Booleanos"
End If
End If
If Label8.Caption = "1" Then
IfText2.Text "F" Then
MsgBox "Solo acepta valores Booleanos"
End If
End If
If Label8.Caption = "1" Then
If Text2.Text "0" Then
MsgBox "Solo acepta valores Booleanos"
End If
End If
If...
Regístrate para leer el documento completo.