VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



converting ascii number to its character equivalent

by Sahacha (1 Submission)
Category: Miscellaneous
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Tue 1st October 2002
Date Added: Mon 8th February 2021
Rating: (1 Votes)

converting ascii number to its character equivalent

Rate converting ascii number to its character equivalent



On Error GoTo erhand

Label1.Caption = Chr(Text1.Text)
Exit Sub
erhand: 'on error erase text written in text1and in label 1

  Text1.Text = Empty
  Label1.Caption = Empty
  End Sub

Private Sub Text1_KeyPress(KeyAscii As Integer)
Select Case KeyAscii 'prevent user from presing wrong keys
Case 48 To 57 ' numbers from 0 to 9
Case Else
KeyAscii = 0
End Select

End Sub


Download this snippet    Add to My Saved Code

converting ascii number to its character equivalent Comments

No comments have been posted about converting ascii number to its character equivalent. Why not be the first to post a comment about converting ascii number to its character equivalent.

Post your comment

Subject:
Message:
0/1000 characters