I want to make a TextBox control that only accepts numerical values.
How can I do this in VB6?
Just select the control and the keyPress method and the IDE create the next method for you. Then add the next code inside the method
Private Sub txtControl_KeyPress(KeyAscii As Integer) KeyAscii = RealKeyascii(txtControl, KeyAscii, 256 ^ 8) End Sub