Try like this:
Code assumes that the text box is named textBox1
Private Sub textBox1_KeyPress(KeyAscii As Integer)
If (KeyAscii >> ASC("a") AND KeyAscii <> ASC("A") Then
Exit Sub
Else
KeyAscii = 0
End If
End Sub
This procedure needs to be hooked up to the keypress event.
Best Regards,
-MRB