Reputation: 4428
I have an ASCII decimal that i want to convert to a character in vb 6. Is it possible? if yes, how do i do that? In other words, how do i convert vb 6 ASCII decimal to vb 6 character?
Dim myChar As Char
Dim myBtye As byte
myChar = ? myByte
Upvotes: 0
Views: 13549
Reputation: 13267
The Chr()
function is the slow Variant version of the deprecated Chr$()
function.
Use ChrW$()
instead, which was introduced over 15 years ago and is far faster.
Upvotes: 5
Reputation: 3266
Dim myByte As byte
Dim myChar As Char
myChar = Chr(myByte)
Chr is returning the string value of the given argument.
btw if you want to convert it back to ascii, you can use the Asc function.
Upvotes: 1