View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bill Manville Bill Manville is offline
external usenet poster
 
Posts: 473
Default appending data from an external text file

Clui wrote:
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