codice:
Private Sub Text1_KeyPress(KeyAscii As Integer)

If Not ((KeyAscii >= 65 And KeyAscii <= 90) Or _
    (KeyAscii >= 97 And KeyAscii <= 122)) Then

    KeyAscii = 0

End If

End Sub