So I want to disallow both numeric and special characters (!"£$% etc) from a textbox. I have used this code which disallows all numbers and the majority of special characters, however for some reason certain characters such as £ and [ still come up when pressed. Any idea why or how to prevent this?
Code:
Private Sub Textbox_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger)
If Not KeyAscii >= 65 And KeyAscii <= 90 Then
If Not KeyAscii >= 97 And KeyAscii <= 122 Then
KeyAscii = 0
End If
End If
End Sub