Archive of Mr Excel Message Board


Back to Data in Excel archive index
Back to archive home

a very easy question

Posted by rainy on July 26, 2001 8:22 AM
what is the easiest way to import a file (unknown number of rows) into a specified location in a worksheet?

i tried this:
Workbooks.OpenText Filename:=sFile
ActiveSheet.UsedRange.Select Selection.Copy ActiveWorkbook.Close
dataSheet.Cells(40, 1).Select
dataSheet.Paste

only when i have large files i get messages that the clipboard is full
and i dont know how to avoid it


Re: a very easy question

Posted by lenze on July 26, 2001 9:14 AM

Data>Get External Data. Use New Database Query or Import a Text File, whichever you need.


This archive is from the original message board at www.MrExcel.com.
All contents © 1998-2004 MrExcel.com.
Visit our online store to buy searchable CD's with thousands of VBA and Excel answers.
Microsoft Excel is a registered trademark of the Microsoft Corporation.
MrExcel is a registered trademark of Tickling Keys, Inc.