Home
Search
 
What's New
Index
Books
Links
Q & A
Newsletter
Banners
 
Feedback
Tip Jar
 
C# Helper...
 
XML RSS Feed
Follow VBHelper on Twitter
 
 
MSDN Visual Basic Community
 
 
 
 
 
 
TitleConvert a character to and from its ASCII code
KeywordsASCII, value, character
CategoriesUtilities
 
Use Asc to get a character's ASCII code. Use Chr to convert an ASCII code into a character.

Thanks to Adan Rivas

 
Private Sub Command2_Click()
     'Code the character
     Label3 = Asc(Text1)
     'clears text box
     Text1 = ""
     ' adds the coded character to textbox (label3)
     LABEL6 = LABEL6 + "," + Label3
     ' set focus to textbox
     Text1.SetFocus
     'decodes the coded character
     Text2 = Text2 + Chr(Label3)
End Sub

Private Sub Command3_Click()
     'this part decodes the coded number
     Label3 = Text3
     Text3 = ""
     LABEL6 = LABEL6 + "," + Label3
     Text2 = Text2 + Chr(Label3)
     Text3.SetFocus
End Sub
 
Formatted by Neil Crosby
 
 
Copyright © 1997-2010 Rocky Mountain Computer Consulting, Inc.   All rights reserved.
  Updated