Home |
Search |
Today's Posts |
#11
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try the following code:
Dim InFNum As Integer: InFNum = 1 Dim OutFNum As Integer: OutFNum = 2 Dim OutFName As String Dim InFName As String Dim S As String Dim WholeS As String InFName = "H:\test.txt" '<< Change OutFName = "H:\out.txt" '<< Change Open InFName For Input As InFNum Do Until EOF(InFNum) Line Input #InFNum, S WholeS = WholeS & S Loop Close InFNum Open OutFName For Output As OutFNum Print #OutFNum, WholeS Close OutFNum -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "JaiJai" wrote in message ... How can I read a mulitple line in a text file and then print it as a single line? eg... she is beautiful output as... she is beautiful -- JaiJai ------------------------------------------------------------------------ JaiJai's Profile: http://www.excelforum.com/member.php...o&userid=19484 View this thread: http://www.excelforum.com/showthread...hreadid=483888 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Can Macro read line graphs? | Excel Discussion (Misc queries) | |||
Can Macro read line graphs? | Charts and Charting in Excel | |||
Read only command line switch | Excel Discussion (Misc queries) | |||
Textbox-read text line by line | Excel Programming | |||
read last line of a file | Excel Programming |