TEXT BOX!!
Meus amigos uma pergunta de leigo como eu sou. TÃ ' querendo quando o usuario digitar os numeros apareça o dois ponto de hora no text box como faço?????????
Valeu!!!!!!!!!!!!!!
Valeu!!!!!!!!!!!!!!
como assim?? por exemplo o cara digita 0000 ai na text box fica 00:00???
Private Sub text1_KeyPress(KeyAscii As Integer)
Select Case KeyAscii
Case vbKeyDelete, vbKeyBack
Case 48 To 57
If Len(text1.Text) = 2 Or Len(text1.Text) = 5 Then
text1.Text = text1.Text & ":"
End If
text1.SelStart = Len(text1.Text)
Case 8, 44
Case Else
KeyAscii = 0
End Select
End Sub
Select Case KeyAscii
Case vbKeyDelete, vbKeyBack
Case 48 To 57
If Len(text1.Text) = 2 Or Len(text1.Text) = 5 Then
text1.Text = text1.Text & ":"
End If
text1.SelStart = Len(text1.Text)
Case 8, 44
Case Else
KeyAscii = 0
End Select
End Sub
vc pode usar essa rotina tbm oh:
Private Sub Text1_Change()
If Len(Text1.Text) = 2 Then
Text1.Text = Text1.Text & ":"
Text1.SelStart = 4
'se quiser que pare com 5 digitos (00:00)
'Text1.MaxLength = 5
End If
End Sub
Valeu!!! Moçada!!!!!!!!!!1[S27]
solucionamos a sua dúvida??? não esqueca de encerrar o topico okz???
e quando fechar, naun esqueça de selecionar quem lhe ajudou.
Tópico encerrado , respostas não são mais permitidas