How do I open a text file and before I begin to interogate it remove all empty lines?
"Do, or do not, there is no try". "Never give up. Never surrender!"
VB Code: Private Sub Command1_Click() Dim sText As String Open "C:\MyTextFile.txt" For Input As #1 sText = Input(LOF(1), 1) Close #1 sText = Replace(sText, Chr$(32), vbNullString) End Sub
Private Sub Command1_Click() Dim sText As String Open "C:\MyTextFile.txt" For Input As #1 sText = Input(LOF(1), 1) Close #1 sText = Replace(sText, Chr$(32), vbNullString) End Sub
Forum Rules