You are not logged in.

IsoCAM

Beginner

  • "IsoCAM" started this thread

Posts: 2

Date of registration: Jun 19th 2011

  • Send private message

1

Sunday, June 19th 2011, 8:44pm

Textbox - Preventing some characters from being input

Hi,

I have a textbox that Iwant to prevent some characters from not being input (%, $, @, #, ? etc)

Can anybody tell me how to do tis in Jabaco.

My Visual Basic code is....

Private Sub Text1_KeyPress(KeyAscii As Integer)
KeyAscii = Asc(Chr$(KeyAscii))

If KeyAscii < 48 Then If KeyAscii <> 45 Then If KeyAscii <> 8 Then KeyAscii = 0
If KeyAscii = 91 Then KeyAscii = 0
If KeyAscii > 58 Then If KeyAscii < 65 Then KeyAscii = 0
If KeyAscii > 92 Then If KeyAscii < 97 Then KeyAscii = 0
If KeyAscii > 122 Then KeyAscii = 0
End Sub

Many thanks in advance!!!!

IsoCAM

Rate this thread
WoltLab Burning Board