Hi all,
How can I read value row by row in Sheet1?
And output all into a txt file?
Thanks.
Hi all,
How can I read value row by row in Sheet1?
And output all into a txt file?
Thanks.
oooh, trickyOriginally Posted by sheeeng
Actually, it is surprisingly simple
Application.DisplayAlerts = False ActiveWorkbook.SaveAs Filename:="C:\myTest\Sheeeng.txt", _ FileFormat:=xlText, _ CreateBackup:=False Application.DisplayAlerts = True
Sorry, xld. Not really what I need.
Maybe I should clarify a bit.
eg.
the macro reads through the each row, output in msgbox the value in the cell, output file, and read the next cell, and so on.......
Most important is that it can read row by row and display the row datas....
Just precede it by a loop to output allOriginally Posted by sheeeng
Dim iLastRow As Long
Dim i As Long
iLastRow = Cells(Rows.Count,"A").End(xlUp).Row For i = 1 To iLastRow Msgbox Cells(i,"A").Value Next i
What does the code below does?
Cells(Rows.Count,"A").End(xlUp).Row
Finds the last non-empty row in column A.Originally Posted by sheeeng
Good. Another solved by alll your help.
Thanks a lot!!