
June 29th, 2004, 05:56 AM
|
|
Contributing User
|
|
Join Date: May 2004
Location: East Side Verona, Southern Europe
Posts: 98
Time spent in forums: < 1 sec
Reputation Power: 5
|
|
|
... a small problem ...
Hi!
I've got a textbox and I need to able te user to insert the point char or the komma char, but only 1 time, and fi the point is yet in the textbox the user can't insert the komma and viceversa ...
asc(",") = 188
asc(".") = 190
so:
Quote:
Private Sub Text6_KeyDown(KeyCode As Integer, Shift As Integer)
If (KeyCode = 188 Or KeyCode = 190) And (InStr(1, Text6.Text, ",") > 0 Or InStr(1, Text6.Text, ".") > 0) Then KeyCode = 0
End Sub |
... but if I run the program I can insert how many points and kommas I want  and if I run it with the debug mode I can't insert points or kommas  ... why?
Thanks for help 
|