derlim30
27-05-2015 18:37:39
Prezados,
Criei o codigo abaixo para tratar o campo cep, colocando-o no keypress do textbox o codigo funciona, tentei criar uma macro com o codigo e chama-lá no evento keypress mas não funcionou, quem puder me ajudar agradeço.
Derli
If (KeyAscii < 48 Or KeyAscii > 57) Then
If KeyAscii <> 8 Then
If KeyAscii <> 13 Then
KeyAscii = 0
End If
End If
End If
If Len(cep) = 5 Then
cep.Text = cep.Text + "-"
End If
Criei o codigo abaixo para tratar o campo cep, colocando-o no keypress do textbox o codigo funciona, tentei criar uma macro com o codigo e chama-lá no evento keypress mas não funcionou, quem puder me ajudar agradeço.
Derli
If (KeyAscii < 48 Or KeyAscii > 57) Then
If KeyAscii <> 8 Then
If KeyAscii <> 13 Then
KeyAscii = 0
End If
End If
End If
If Len(cep) = 5 Then
cep.Text = cep.Text + "-"
End If