|
-
Aug 26th, 2005, 08:39 AM
#1
Thread Starter
Lively Member
[RESOLVED] Chr() and Asc() help
Not sure if any of this will make sense without the whole code but...
VB Code:
For a = 1 To Len(Data)
PrintText = PrintText & " " & ChrB(Asc(Right(Left(Data, 1), Len(Data) - a + 1)) + Keycode(a))
'MsgBox a
'MsgBox ChrB(Asc(Right(Left(Data, a), Len(Data) - a + 1)) + Keycode(a))
Next
'MsgBox PrintText
Basically, it gets ever letter, switches to its ascii value, adds the variable Keycode to it, then changes back into Chr()
Anywany, print text is supposed to string all the letters together, IE.
If the first letter converts to "æ"
then second letter converts to "£"
and the third letter converts to "₧"
printText should give the value "æ £ ₧"
But for some reason it ends up with "??Ü" or something similar
I have the msgbox's to check that the letters are being evaluated properly, and they are, but the PrintText is getting messed up somewhere
Edit: Added [vbcode][/vbcode] tags for clairty. - Hack
Last edited by Robert123; Aug 26th, 2005 at 09:25 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|