USUÁRIO:      SENHA:        SALVAR LOGIN ?    Adicione o VBWEB na sua lista de favoritos   Fale conosco 

 

  Fórum

  Visual Basic
Voltar
Autor Assunto:  Bloquear um TextBox
>>|Bedin|<<
SANTO ANDRE
SP - BRASIL
Postada em 23/12/2005 08:31 hs            
Como faço para o usuário digitar apenas "letras" e bloquear a text qnd ele digitar números?!
 
 
VALEWS!!! 

.:Rodrigo Bedin:.
     
Shel
GOIÂNIA
GO - BRASIL
Postada em 23/12/2005 09:42 hs         
Rodrigo,
 
 
Att.
Marcelo
 
     
Geronimo
Pontos: 2843
JOINVILLE
SC - BRASIL
Postada em 23/12/2005 13:33 hs            
Ou :
Caso queira somente Texto então sera como abaixo.

Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii >= 49 And KeyAscii <= 57 And KeyAscii <> 8 Then
KeyAscii = 0
End If
End Sub

Aproveitando o contrario:
Se Você quiser que somente numeros sejam aceitos em controles TextBox faça,
da seguinte forma:

Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii < 49 Or KeyAscii > 57 And KeyAscii <> 8 Then
KeyAscii = 0
End If
End Sub
 

"O pior inimigo que você poderá encontrar será sempre você mesmo."
     
Página(s): 1/1    


Seu Nome:

Seu eMail:

ALTERAR PARA MODO HTML
Mensagem:

[:)] = 
[:P] = 
[:(] = 
[;)] = 

HTML DESLIGADO

     
 VOLTAR

  



CyberWEB Network Ltda.    © Copyright 2000-2025   -   Todos os direitos reservados.
Powered by HostingZone - A melhor hospedagem para seu site
Topo da página