你用Input方式打开不能用PrintDim temp As StringPrivate Sub Command1_Click()
  Dim filenum As Long, SeekNum As Long
  Dim VarStr As String
  filenum = FreeFile
  SeekNum = 6
  
  Open "c:\temp\abc.txt" For Input As filenum
  Do Until EOF(filenum)
    Line Input #filenum, VarStr
    i = i + 1
    If i <> SeekNum Then
      temp = temp & VarStr & vbCrLf
    Else
      temp = temp & "ssssss" & vbCrLf
    End If
  Loop
  Close #filenum
  
  filenum = FreeFile
  Open "c:\temp\abc.txt" For Output As #filenum
  Print #filenum, temp
  Close #filenum
End Sub