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.
 
Back
Top