|
-
Nov 12th, 2000, 01:03 PM
#1
Hi there.
I have a problem, here is my code:
Code:
Private Sub Grid1_KeyPress(KeyAscii As Integer)
Grid1.Text = Grid1.Text & Chr(KeyAscii)
End Sub
every time i press the backspace button "chr(8)" it ads an vertical bar insted of erasing the last charecter, can someone help me out?
numibesi
-
Nov 12th, 2000, 02:56 PM
#2
Hyperactive Member
Code:
Private Sub Grid1_KeyPress(KeyAscii As Integer)
If KeyAscii > 31 then Grid1.Text = Grid1.Text & Chr(KeyAscii)
End Sub
This will allow all control characters
-
Nov 12th, 2000, 02:59 PM
#3
Hyperactive Member
Hmm
You'll probably also need this:
Code:
If KeyAscii = 8 then
Grid1.Text = Left(Grid.Text,Len(Grid1.Text) - 1)
End If
-
Nov 12th, 2000, 03:01 PM
#4
That´s not he problem
The problem is that when i need to erase the last imputed character using the Backspace button it doesn´t work using your code, or it imputs an vertical bar charater using my code.
numibesi
-
Nov 12th, 2000, 03:05 PM
#5
Sorry
Sorry marnitz,
it does work now thank you marnitz, i was replying at the time so i didin´t saw your post. Thx
numibesi
-
Nov 12th, 2000, 03:09 PM
#6
Hyperactive Member
No prob. Enjoy!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|