Home
Search
 
What's New
Index
Books
Links
Q & A
Newsletter
Banners
 
Feedback
Tip Jar
 
 
 
 
500MB 27GB Web Hosting - $9.95/Month
 
 
 
 
 
Old Pages
 
Old Index
Site Map
What's New
 
Books
How To
Tips & Tricks
Tutorials
Stories
Performance
Essays
Links
Q & A
New in VB6
Free Stuff
Pictures
 
 
 
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-2003 Rocky Mountain Computer Consulting, Inc.   All rights reserved.
  Updated