Saving cell content externally.

  • Thread starter Thread starter Paul
  • Start date Start date
P

Paul

Using XL 2000

Cell A1 in my worksheet contains concatenated data.
There will be upto 200 rows.

I'm looking for a code solution that would loop through
each cell in the range (A1:A100), collect and save the
content, line by line in a text file on my local drive.

Each time the macro was executed, The new data would
overwrite the existing file.

If possible, any ideas appreciated.
Many thanks
Paul
 
Activesheet.copy
ActiveSheet.Rows(101).Resize(65536-100).EntireRow.Delete
Range("A1:A100").Formula = Range("A1:A100").Value
Columns(2).Resize(,255).Delete
On Error Resume Next
kill "C:\MyData\Myfile.Txt"
On Error goto 0
ActiveWorkbook.SaveAs "C:\MyData\Myfile.txt", FileFormat:=xlText
ActiveWorkbook.Close SaveChanges:=False
 
Back
Top