Private Sub Command1_Click()
Dim col As New Collection ’定义集合对象
Open "c:\you.txt" For Input As #1 ’假如文件"c:\you.txt"
Dim strLine
Do Until EOF(1) '读取文件
Line Input #1, strLine
If InStr(strLine, vbTab) > 0 Then '判断是否有Tab符
col.Add strLine
Else
col.Add strLine & vbTab
End If
Loop
Close #1
Open "c:\you.txt" For Output As #1
For Each strLine In col ‘写入文件
Print #1, strLine
Next
Close #1
End Sub