appending data from an external text file

  • Thread starter Thread starter clui
  • Start date Start date
C

clui

I'm tyring to append data from an external tab-delimited text file to a
worksheet named "all" in the active workbook. I only need the data
from Row 2 and above (whatever the last row is) from the external text
file. How do I code it? Thanks a lot!!
 
Clui said:
I'm tyring to append data from an external tab-delimited text file to a
worksheet named "all" in the active workbook. I only need the data
from Row 2 and above (whatever the last row is) from the external text
file. How do I code it? Thanks a lot!!

Record yourself opening the text file and insert that code at '****

Dim WB As Workbook
Set WB = ActiveWorkbook
'****
Range("A1").CurrentRegion.Offset(1).Copy destination:= _
WB.Sheets("All").Cells(Rows.Count, "A").End(xlUp).Offset(1)
ActiveWorkbook.Close False

Bill Manville
MVP - Microsoft Excel, Oxford, England
No email replies please - reply in newsgroup
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top