Assuming you want the OpenDialogue function to get you a folder name, use
the code from "The Access Web" as I suggested before.
http://www.mvps.org/access/api/api0002.htm
--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
Quote:
> It works very well, thanks...
> and do you know if it has OpenDialogue function in Excel VBA ??
> > If you know the name of the folder, you can use the Dir function to
return
> > each file in that folder:
> > ' Return all txt files in the root of C:\
> > strPath = "c:\*.txt" ' Set the path.
> > strFile = Dir(strPath) ' Retrieve the first entry.
> > Do While Len(strFile) <> "" ' Start the loop.
> > ' Do whatever you have to with that file
> > strFile = Dir ' Get next entry.
> > Loop
> > To allow the user to select the folder, see the second entry in the APIs
> > section of "The Access Web". http://www.mvps.org/access/
> > --
> > Doug Steele, Microsoft Access MVP
> > http://I.Am/DougSteele
> > > Actually I am going to analyse all that content of the text file, so I
> > need
> > > to open a list of file and analyse the content of selected files.
Take
> an
> > > example,
> > > my project must be able to select 8000 files, then my project should
be
> > able
> > > to open one by one and then analyse the content of the files ( all in
> text
> > > format)
> > > is it more clear now : )
> > > > There's code, contributed by Ken Getz, to use the Windows
> > > > Common Dialog API directly, to obtain a file name in the API
> > > > section of http://www.mvps.org/access. I don't exactly
> > > > understand what you mean by "open the content of files (more
> > > > than one)". Access File I/O commands open one file... you
> > > > could have several individual files open at the same time...
> > > > or you could copy the content into a table if you need all
> > > > the contents to be available concurrently.
> > > > > Hi,
> > > > > I am trying to open the content of files ( more than one)
> > > > in VBA, which
> > > > > function or method I should look for in order to do so? I
> > > > don't mind if it
> > > > > is using "drag and drop" or "Open Dialogue box" to select
> > > > multi-files.
> > > > > Thanks