Using Message Box to Open/Import Text File

  • Thread starter Thread starter hjones
  • Start date Start date
H

hjones

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.
 
Use

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

see help for details.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top