Allright, Im programming a MMORPG, I dont want Numbers Nor Spaces in the Name. So, I set this up;
Works exactly how I wanted,But Wait, I can't backspace now. So, Does anyone know how I could make it allow the backspace key?Code:Private Sub txtName_KeyPress(KeyAscii As Integer) Dim ch As String ch = Chr$(KeyAscii) If Not ( _ (ch >= "a" And ch <= "z") Or _ (ch >= "A" And ch <= "Z") _ ) Then ' Cancel the character. KeyAscii = 0 End If End Sub




Reply With Quote