字节如何转化为字符呢?

Dim str(0 To 1) As Byte
str(0) = 66
str(1) = 66
现在想把这两个内容 转化为 BB
该如何做?
[99 byte] By [wanyeye-助人者天助] at [2008-1-9]
# 1
66 对应的是 B

想把这个内容 转为 BB 该如何处理?
wanyeye-助人者天助 at 2007-10-18 > top of Msdn China Tech,visual basic,基础类...
# 2
Chr(str(0))

或chr(66)
stlyl-stlyl-维生素B at 2007-10-18 > top of Msdn China Tech,visual basic,基础类...
# 3
楼上正解
UruseiBest-UruseiBest at 2007-10-18 > top of Msdn China Tech,visual basic,基础类...
# 4
用strconv 函数转换即可

Dim str1(0 To 1) As Byte
str1(0) = 66
str1(1) = 66
Debug.Print StrConv(str1, vbUnicode)

结果:
BB

# 5
直接等于就行了

Dim str1(0 To 1) As Byte
str1(0) = 66
str1(1) = 66

dim s as string
s=str1
debug.print s
xmxoxo-xmxoxo at 2007-10-18 > top of Msdn China Tech,visual basic,基础类...
# 6
直接等于就行了

Dim str1(0 To 1) As Byte
str1(0) = 66
str1(1) = 66

dim s as string
s=str1
debug.print s

支持