用vb怎样提取一个文本文件xxx.txt里面的内容,按行提取
并将每行里的《Tab》按键 转换为字符串chr(14)..

解决方案 »

  1.   

    dim str as string 
    text1.text=""
    open filename for input as #1
       do while eof(1)
         line input #1,str
         str=replace(str,??,chr(14))'tab的值是多少啊???,找到的话自己替换一下啦
         text1.text=text1.text+str
       loop
    close #1
      

  2.   

    你可以用fso对象,
    set f=fso.file
    do while not atentfile
        z=f.readline
     loop
    这样就可以按行读取文本的每一行了
    具体你可以查看msdn的fso对象
      

  3.   

    还有个问题如果文本里面有中文就出现乱码用 StrConv(InputB$(LOF(1), #1), vbUnicode)转换也不行,改怎么办|?