第2个回答 2010-02-08
Dim linetxt As String, alltxt As String, n As Long
Open "D:\1.txt" For Input As #1
Do While Not EOF(1)
Line Input #1, linetxt
n = n + 1
If n = 1 Then
MsgBox linetxt
Else
alltxt = alltxt & linetxt & vbCrLf
End If
Loop
Close #1
Kill "D:\1.txt"
Open "D:\1.txt" For Binary As #1
Put #1, , alltxt
Close #1