Private Sub Text1_KeyPress(KeyAscii As Integer) If (KeyAscii >= 97) And (KeyAscii <= 122) Then KeyAscii = KeyAscii - 32 End If End Sub