
08-22-2003, 11:01 PM
|
|
Junior Contributor
|
|
Join Date: Jun 2003
Location: Australia
Posts: 241
|
|
In the keypress event of the textbox, have something like:
Code:
Private Sub Text1_KeyPress(KeyAscii As Integer)
If Chr(KeyAscii) <> "a" And Chr(KeyAscii) <> "b" And KeyAscii <> 8 Then KeyAscii = 0
End Sub
The KeyAscii <> 8 is to enable backspace.
|
|