View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Arnie[_4_] Arnie[_4_] is offline
external usenet poster
 
Posts: 6
Default Multiple txt files import

Not completely,

I have 10 .txt files in a directory. Each file has 10 lines. I want to put
each line in a cells where every row is the contect of one txt file.



"ianripping " schreef in bericht
...
This should work:-

Sub Macro1()
Workbooks.Open Filename:= "filename.txt"
Selection.Copy
Windows("Book1").Activate
Range("A1").Select
ActiveSheet.Paste
MsgBox ("Complete")
End Sub

Just put the path and filename of "filename.txt" and the current
workbooks name in "Book1"


---
Message posted from http://www.ExcelForum.com/