I am trying to add ascii code to a string. For instance: something would be a string. something = something + ascii for 120. How would I do that? If the question is phrased confusingly, please say.
Thanks joe
Printable View
I am trying to add ascii code to a string. For instance: something would be a string. something = something + ascii for 120. How would I do that? If the question is phrased confusingly, please say.
Thanks joe
Code:Private Sub Command1_Click()
Dim MyStr As String
MyStr = "hello "
MyStr = MyStr & Asc(120)
MsgBox MyStr
End Sub
thanx a bunch, i thought it was something like that.
Forever in your debt,
joe
well maybe not forever....
Asc() converts a character to the ASCII value. If you want to convert 120 to a character, use the Chr() function.
Code:MyString = MyString + Chr(120)
thanx megatron :) the guru is right as usual. I am afraid asc() does not work. Thanks megatron