PDA

Click to See Complete Forum and Search --> : dificult txtbox question


casparas
Jan 6th, 2000, 05:55 AM
lets say i have textbox and i want user not to type more than two simbols afterv the dot

smth. like that

2.11
6322345646465456.32
blalakbblabalaba.ms
icantwritemorethantwosimbolsafterthed.ot

Gimpster
Jan 6th, 2000, 06:02 AM
This is just an idea that I thought up, but how about this:

Private Sub Text1_KeyPress()
If KeyAscii = vbKeyDecimal Then
Text1.MaxLength = Len(Text1.Text) + 2
End If
End Sub

That might work, at least it's someplace to start.

------------------
Ryan


[This message has been edited by Gimpster (edited 01-06-2000).]

casparas
Jan 6th, 2000, 06:10 AM
thanx

-casparas