我定义了 
 dim aa[100] as byte;
 dim str as string ; str = "123456789";
 我想得到 : aa[0] = 1 ,aa[1] =2 ,…… 请问怎么写, 还有怎样将数组转换回字符串 ?

解决方案 »

  1.   

    for i=1 to len(str)
        aa(i)=mid(str,i,1)
    next
      

  2.   

    转成byte数组
    dim aa() as byte
    dim str as string
    str="123456789"
    aa=strconv(str,vbFromUnicode)转成字符串
    for i=0 to ubound(aa)
        str=str & chr(aa(i))
    next
      

  3.   

    呵呵 
     dim tempStr as String
       for i=1 to 100
         tempStr=tempStr & a[i]
       next
    不就行了吗:)
      

  4.   

    还是Cooly(☆开心就好 ^o^ ☆) 快啊!
    Cooly:渡完蜜月了?:)
      

  5.   


    Private Sub Form_Load()
    Dim aa(200) As Byte
    Dim str As String
    Dim ReStr As String str = "123456789"
     
    For I = 1 To Len(str)
        aa(I) = Mid(str, I, 1)
    NextFor I = 1 To Len(str)
        ReStr = ReStr & aa(I)
    NextMsgBox ReStr
    End Sub
      

  6.   

    FOR I=0 TO MAX(AA)
       STR=STR & AA(I)
    NEXT
      

  7.   

    for i=0 to len(str)-1
      aa(i)=val(mid(str,i+1,1))
    next i
      

  8.   

    转成字符串
    for i=0 to ubound(aa)
        if aa(i)=0 then exit for
        str=str & chr(aa(i))
    next