Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Using Message Box to Open/Import Text File

Hello

I was wondering if it is possible to Import multiple text
files to different sheets within a workbook. I would
like to do this by having a box (I think it's called a
messge box) open asking for the user to type in the file
name. Each file will be from the same path, so could
that could be set as default path? Is this possible?

Thanks for the help.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Using Message Box to Open/Import Text File

Use

Chdrive "C"
Chdir "C:\my textfiles"
arrFnames = Application.GetOpenfileName( _
filefilter:= "Text Files (*.txt),*.txt", multiSelect:=True)

see help for details.

--
Regards,
Tom Ogilvy

"hjones" wrote in message
...
Hello

I was wondering if it is possible to Import multiple text
files to different sheets within a workbook. I would
like to do this by having a box (I think it's called a
messge box) open asking for the user to type in the file
name. Each file will be from the same path, so could
that could be set as default path? Is this possible?

Thanks for the help.



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
Open/Import MS Money OFX file into Excel? Joe User[_2_] Excel Discussion (Misc queries) 3 January 29th 10 11:38 PM
How come I can't import an .svc file(Open Office) to Excel file? beezer Excel Discussion (Misc queries) 1 August 28th 06 12:05 AM
Error message when using Excel to open text file orutulsa Excel Discussion (Misc queries) 2 March 14th 06 06:10 PM
open file file then error message Piroon Saetang Excel Discussion (Misc queries) 1 February 4th 05 12:05 AM
Use VBA code to open a text file with the import wizard George Wilson[_2_] Excel Programming 2 September 10th 03 07:55 PM


All times are GMT +1. The time now is 11:33 PM.

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

About Us

"It's about Microsoft Excel"