Ver Mensaje Individual
  #2 (permalink)  
Antiguo 21/09/2007, 14:51
ReViJa
 
Fecha de Ingreso: abril-2007
Mensajes: 187
Antigüedad: 17 años
Puntos: 1
Re: Validacion para no poner el cero en la primera posicion

Esta manera te puede servir, pero recuerda que si haces Copy/paste dentro del txt con un 0x se lo comera.

Código:
Private Sub Text1_KeyPress(KeyAscii As Integer)
Select Case KeyAscii
  Case 48
    If Text1 = "" Then KeyAscii = 0
End Select
End Sub
Te dejo otra bastante sencilla y a mi gusto mas efectiva:

Código:
Private Sub Text1_Change()
If Left(Text1, 1) = "0" Then Text1 = ""
End Sub

Espero que te sirva.