很简单 用ascii码来控制就可以
Private Sub Text1_KeyPress(KeyAscii As Integer) Select Case KeyAscii Case 8, 48 To 57, 65 To 90, 97 To 122 Case Else KeyAscii = 0 End SelectEnd Sub