Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Importing Text file into Excel 2003

Can I get some sample VBA code which would import a text file into Excel
2003.

Thanks,
Ray


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Importing Text file into Excel 2003

Workbooks.Open "C:\MyFolder\MyFile.Txt"
or if you have Excel 2000 or later, turn on the macro recorder and to

Data=Get External Data (or Import External Data) and navigate to the
Import Text file option and import your data manually.

If you need parse the text file, then for the first method turn on the macro
recorder as well and go through the text import wizard - it will record
arguments to the OpenText method.

--
Regards,
Tom Ogilvy

"Ray" wrote in message
...
Can I get some sample VBA code which would import a text file into Excel
2003.

Thanks,
Ray




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Importing Text file into Excel 2003

Great idea. Thanks Tom!

"Tom Ogilvy" wrote in message
...
Workbooks.Open "C:\MyFolder\MyFile.Txt"
or if you have Excel 2000 or later, turn on the macro recorder and to

Data=Get External Data (or Import External Data) and navigate to the
Import Text file option and import your data manually.

If you need parse the text file, then for the first method turn on the
macro
recorder as well and go through the text import wizard - it will record
arguments to the OpenText method.

--
Regards,
Tom Ogilvy

"Ray" wrote in message
...
Can I get some sample VBA code which would import a text file into Excel
2003.

Thanks,
Ray






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
Excel 2003 - importing a large .csv file Linda in Wyo Excel Discussion (Misc queries) 4 November 8th 08 02:54 AM
importing text file to excel sherry Excel Discussion (Misc queries) 1 February 20th 08 08:17 PM
Importing Text File into Excel Martin Excel Discussion (Misc queries) 1 April 2nd 06 02:48 PM
importing text file in excel UT Excel Discussion (Misc queries) 0 March 16th 06 10:20 PM
Importing multiple Text files into Excel 2003 JMA Excel Discussion (Misc queries) 5 May 5th 05 09:48 PM


All times are GMT +1. The time now is 08:45 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"