I know I can do something like this:
Private Sub Text1_KeyPress(KeyAscii As Integer)
if keyascii=120 then
keyascii=121
end if
end sub
and this will replace a users input of an 'x' with a 'y'.
However I need to stop a value of keyascii being reproduced for the backspace and perform something else instead. For example you would imagine you could do this:
Private Sub Text1_KeyPress(KeyAscii As Integer)
if keyascii=8 then
keyascii=121
end if
end sub
Which I would like to covert a backspace into a 'y'. But this won't work. I assume its because 8 isn't a standard ascii character.
So how else can I do it?
I'm not trying to just limit what the user enters as I must perform some sort of action when this occurs too.
Any ideas?
elziko
Private Sub Text1_KeyPress(KeyAscii As Integer)
if keyascii=120 then
keyascii=121
end if
end sub
and this will replace a users input of an 'x' with a 'y'.
However I need to stop a value of keyascii being reproduced for the backspace and perform something else instead. For example you would imagine you could do this:
Private Sub Text1_KeyPress(KeyAscii As Integer)
if keyascii=8 then
keyascii=121
end if
end sub
Which I would like to covert a backspace into a 'y'. But this won't work. I assume its because 8 isn't a standard ascii character.
So how else can I do it?
I'm not trying to just limit what the user enters as I must perform some sort of action when this occurs too.
Any ideas?
elziko