比如文本框1有格式如下的两位数(数量不等)进行分组,输出到文本框201,02,03,04,05,06,07,08,....如何用进行分组,分为M组,每组N行.01,02,
03,04,05,06,
07,08,谢谢

解决方案 »

  1.   

    用split函数
    dim s() as string
    s=split(text1.text,",")
    这样s中就是s(0)=01 s(1)=02
    然后输出
    至于怎么输出你肯定会了
      

  2.   

    这样.
    Dim flg as String
    flg = "01,02,03,04,05,06,07,08"
    TagElem = Split(flg, ";")
    For i = 0 To ubound(TagElem)
         结果=TagElem(i)
    NextEnd Sub
      

  3.   

    接着上面的说
    你现在得到了s数组就开始输出了。首先你要确定你的text2可以多行显示multilne=true不如你现在想显示
    01,02
    03,04做一个循环
    for i=0 to cint(ubound(s)/2)
      on error resume nest
      text2.text=s(i) &"," &s(i+1) &chr(13)
    next i你自己做个断点试验一下吧
      

  4.   

    帮clear_zero(清晰) 纠正
    for i=0 to cint(ubound(s)/2)  '这里估计用int(ubound(s)/2)就可以了
      on error resume nest   ‘next
      text2.text=s(i) &","& s(i+1) &vbCrlf
    next i