Take a look at http://www.mvps.org/access/api/api0001.htm
The 4 line example at the start of the page shows how you'd get the filename
in a variable using the code on the rest of the page:
Dim strFilter As String
Dim strInputFileName as string
strFilter = ahtAddFilterItem(strFilter, "Excel Files (*.XLS)", "*.XLS")
strInputFileName = ahtCommonFileOpenSave( _
Filter:=strFilter, OpenFile:=True, _
DialogTitle:="Please select an input file...", _
Flags:=ahtOFN_HIDEREADONLY)
Once you've got the filename in a variable, you can plug that value into a
text box using code like:
Me.txtFilename = strInputFileName
(where txtFilename is the name of a text box on your form)

Signature
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)
> Hi! First off all congratulations for you all by make this discussion group
> so helpfull.
[quoted text clipped - 8 lines]
> I saw the Georgie's thread on 10/5/2005 but I don't know
> if the solutions presented are the same for my question.
Nuno Guerra - 31 Oct 2005 17:14 GMT
Thanks a lot. It works!!
I would like to ask just a last question:
For default, this code browses a window in "My Documents". How can I
pre-define a specific location by default?
Thanks again.
> Take a look at http://www.mvps.org/access/api/api0001.htm
>
[quoted text clipped - 32 lines]
> > I saw the Georgie's thread on 10/5/2005 but I don't know
> > if the solutions presented are the same for my question.
Nuno Guerra - 31 Oct 2005 17:22 GMT
Douglas, I think I just found it:
Is in ahtCommonFileOpenSave Function.
I have to change this line "If IsMissing(InitialDir) Then InitialDir = CurDir"
and change the CurDir Value for the folder's name string, am I correct?
> Thanks a lot. It works!!
>
[quoted text clipped - 40 lines]
> > > I saw the Georgie's thread on 10/5/2005 but I don't know
> > > if the solutions presented are the same for my question.
Douglas J Steele - 31 Oct 2005 18:23 GMT
Actually, it's even simpler than that.
You simply have to pass a value for InitialDir when you call the function.
Take a look at the function GetOpenFile that's defined in the stuff you
copied from that page. It shows using that parameter.

Signature
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)
> Douglas, I think I just found it:
> Is in ahtCommonFileOpenSave Function.
[quoted text clipped - 46 lines]
> > > > I saw the Georgie's thread on 10/5/2005 but I don't know
> > > > if the solutions presented are the same for my question.