Option Explicit Private Sub cmdConvert_Click() txtCode(0).Text = KeyCode("A") End Sub Public Function KeyCode(KeyStr As String) As String Select Case KeyStr Case "A": KeyStr = Chr(KeyStr) End Select End Function