ASC Character Converter

We can create a Asc to Chr and Chr to Asc converter in VB. Let’s examine the following Example:

In this example, we create two buttons, label one of them as ASC and the other one as CHR. Insert two textboxes, one for the user to enter an ASC code and the other one to enter the CHR character. When the user enter an ASC code, he or she can check for the corresponding character by clicking the CHR button. Likewise, he or she can check the corresponding ASC code after entering a character.

The Code

Private Sub CmdASC_Click()
TxtASC.Text = Asc(TxtCHR.Text)
End Sub

Private Sub CmdCHR_Click()
TxtCHR.Text = Chr(TxtASC.Text)
End Sub

Please refer to the following article for more details.