Hi
Please help me in setting textbox property to not to allow any spaces in the text we type.
Thanks & Regards
Hi
Please help me in setting textbox property to not to allow any spaces in the text we type.
Thanks & Regards
The easiest way is to turn on KeyPreview for the Form and then kill the space in the KeyDown Event.
Code:Private Sub YourControl_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 32 Then '-- the Space bar KeyCode = 0 '-- Just kill the key ' KeyCode = 7 '-- Or maybe change it to a beep End If End Sub
Thanks a lot