hi, myself vandana. is there any property of textbox that can allow textbox to accept only numbers. i tried it by setting dataformatting property to number but nothing happens.
thx in adv.
thx in adv.
if instr(validstr,chr(skeyascii))=0 then 'code to supress the keyascii else 'return same keyascii end if
if instr(validstr,chr(skeyascii))=0 then 'code to supress the keyascii else 'return same keyascii end if
Private Sub txtR_KeyPress(KeyAscii As Integer) If (KeyAscii >= 48 And KeyAscii <= 57) Or (KeyAscii = 8) Then 'keyascii =8 stands for backspace txtR.Locked = False Else txtR.Locked = True End If End Sub
Private Sub txtR_KeyPress(KeyAscii As Integer)
If Not ( _
(KeyAscii >= "48" And KeyAscii <= "57") Or (KeyAscii = "8")) Then
KeyAscii = 0
End If
End Sub
Private Sub txtR_KeyPress(KeyAscii As Integer) If (KeyAscii >= 48 And KeyAscii <= 57) Or (KeyAscii = 8) Then 'keyascii =8 stands for backspace txtR.Locked = False Else txtR.Locked = True End If End Sub
Private Sub txtR_KeyPress(KeyAscii As Integer)
If Not ( _
(KeyAscii >= "48" And KeyAscii <= "57") Or (KeyAscii = "8")) Then
KeyAscii = 0
End If
End Sub
Comment