.txt-export - select whole workbook and mark each row
Posted by Alex Kerste on October 26, 2000 5:23 AM
Hello!
Thanks to
2433a.html
A large part of my problem with exporting an excelfile from Excel 97 to a .csv-File automatically it has already been solved by you, thanks.
Yet, I've still got two more problems:
How do I select the whole workbook and
Is there a way to put some special character or entry (lets say "EndOfLine!") at the end of every row of the original worksheet?
This is the code I currently use:
Sub AlsTextSpeichern()
Dim MyRg As Range
Dim TextCell As Range
Dim TxtToWrite As String
Set MyRg = Range("a1:J155")
For Each TextCell In MyRg
TxtToWrite = TxtToWrite & TextCell.Text & Chr(124)
Next
Open "C:\Test.txt" For Output As #1
Print #1, TxtToWrite
Close #1
End Sub
Thank you,
Alex