Thread: output text
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Rob van Gelder[_4_] Rob van Gelder[_4_] is offline
external usenet poster
 
Posts: 1,236
Default output text

Sub test()
Const cPath = "C:\T\"
Dim i As Long, lngLastRow As Long
Dim intFreeFile As Integer

With ActiveSheet
lngLastRow = .Cells(Rows.Count, 1).End(xlUp).Row

For i = 1 To lngLastRow
intFreeFile = FreeFile
Open cPath & .Cells(i, 1).Value For Output As #intFreeFile
Print #intFreeFile, .Cells(i, 2).Value
Close #intFreeFile
Next
End With
End Sub


--
Rob van Gelder - http://www.vangelder.co.nz/excel


"ktokuo" wrote in message
...
I am trying to output the text in excell cells.

For example how do you output text file

A B
1 2 Hello
2 5 Hi
3 28 Good

How can I output a tex file containing B1 with the
file title of A1. I also want to make separate text
files for each row.

Any advice of Help would be appriciatted

Thanks

Kuni