Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Importing multiple text files into single workbook

Hi everyone. I have a folder that receives data dumps from a
different system. The files are text files, contain data on only 1
sheet, and the names of the files are generated from the other system.

I would like a macro that would allow me to select various files
within the same folder, and copy the data into a seperate worksheet
within the same workbook.

So basically, I'd like to choose and consolidate multiple text files
into 1 excel workbook containing many worksheets.

I have very limited knowledge of VBA. Thanks so much!!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Importing multiple text files into single workbook

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/

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
importing multiple text files into the same worksheet Mike D Excel Discussion (Misc queries) 4 July 15th 05 10:39 AM
Importing multiple Text files into Excel 2003 JMA Excel Discussion (Misc queries) 5 May 5th 05 09:48 PM
importing multiple text files URGENT!!! HELP tasha Excel Worksheet Functions 0 December 19th 04 04:26 PM
importing multiple text files??? tashayu Excel Discussion (Misc queries) 0 December 19th 04 02:43 PM
Importing Multiple lines of text in a single Excel Cel filmfatale Excel Programming 1 December 8th 03 08:33 PM


All times are GMT +1. The time now is 01:46 PM.

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"