| This only lets numbers into the txt box and filters out all letters In the Keypress event of your textbox, insert the following code: If KeyAscii < 48 Or KeyAscii > 57 Then KeyAscii = 0 This makes the text that is typed go backwards (backwards not as letters facing other way) Private Sub Text1_KeyPress(KeyAscii as Integer) Static TextBoxStr as String 'Create a string that stays there... TextBoxStr = Chr(KeyAscii) & TextBoxStr 'Add the key pressed to the front of the variable that holds the actual displayed text text1.Text = TextBoxStr 'Display that variable as the text box's text KeyAscii = 0 'Turn the KeyAscii to null so that it doesn't put the letter in the textbox on its own End Sub |
Filter out empty spaces in a Text-Box |
Freelance ASP PHP web development | Web developer India Web development India| Prayagasoft - web designer India, Ecommerce developer india, Ecommerce design