Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default appending data from an external text file


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!!


------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from http://www.ExcelForum.com/

~~Now Available: Financial Statements.xls, a step by step guide to creating financial statements
  #2   Report Post  
Posted to microsoft.public.excel.programming
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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Inserting text from external file into cells. warirv63 Excel Discussion (Misc queries) 0 April 16th 08 07:27 AM
Appending external query to list Jan Excel Discussion (Misc queries) 0 February 27th 07 04:02 PM
Appending external worksheets into existing workbook? Xuratoth Links and Linking in Excel 5 October 4th 05 12:48 PM
How do I reference external data from a file, file name found in . Clux Excel Discussion (Misc queries) 1 February 10th 05 10:52 PM
Get External Data, Import Text File, File name problem Scott Riddle Excel Programming 1 July 11th 03 05:40 PM


All times are GMT +1. The time now is 06:50 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"