Attribute VB_Name = "Module1" Sub RemoveLineFromFile(ByVal RemoveText As String, ByVal strFile As String) Dim NewFile As String Dim LineText As String NewFile = "" LineText = "" Open strFile For Input As #1 Do Until EOF(1) Line Input #1, LineText If LineText = RemoveText Then 'Do not print in new file, supposed to be remmed Else NewFile = NewFile & LineText & Chr(13) & Chr(10) End If Loop Close #1 Open strFile For Output As #1 Print #1, NewFile Close #1 End Sub