dim a(1 to 200) as string
dim exit_while as boolean
dim str
dim i as integer
dim j as integer
dim s as string
i=1
s=".........." '很长的
whiel not exit_while
   str=right(s,70)
   a(i)=str
   j=len(s)-70
   if j>0 and i<201 then
      s=left(s,j)
    else
      exit_while=true
    end if
wend

解决方案 »

  1.   

    dim a() as string
    dim str as string
    dim strdim '数组维数
    dim i as long 
    str="xxx……" '此为字符串
    strdim=len(str)\70
    if strdim mod 70<>0 then
        strdim=strdim+1
    end if
    redim a(strdim)
    for i=0 to strdim
       a(i)=mid(i*70 +1,str,70)
    next楼主,这个满足你的意思吗?
      

  2.   

    const StrStep as long = 70
    Dim TempStr as StringDim StrData() as String
    Dim StrCount as longDim I as long
    TempStr=……
    StrCount=(Len(TempStr)+StrStep-1)\StrStep
    If StrCount<>0 Then
        ReDim StrData(0 to StrCount-1)
        
        For I=0 to StrCount-2
            StrData(I)=Mid$(TempStr, StrStep*I+1, StrStep)
        Next I
        StrData(StrCount-1)=Mid$(TempStr, StrStep*(StrCount-1)+1)
        
    End If