Producing a Browse Window

  • Thread starter Thread starter Chaplain Doug
  • Start date Start date
C

Chaplain Doug

Access 2002. I need to produce a browse window wherein
the user can browse for and select a file. I need to then
use the selected file name in my VBA code. How is this
done? Thanks
 
MS Access 2002 VBA help gives me code to produce the
Open/Save window. But,

Dim fd As FileDialog

Get the error message "User-defined type not defined"

Any ideas?
 
FileDialog is in the Microsoft Office library... you must select it in the
VBE's references list. It's not automatically part of ACCESS default
references.

For A2K2, it'll be Microsoft Office 10.0 Library.
 
Any ideas?

Yep. Use the code at http://www.mvps.org/access/api/api0001.htm.

Quoting a post from earlier this week by Access MVP Allen Browne:

"Although there is a FileDialog object in the later versions [of Access],
that's not a
good way to go. Requires a reference to the Office library. Obviously won't
work with older versions. Won't work with mde/runtimes. And does not work at
all for Save As, even though it offers that in the Intellisense."
 
And even though I posted the "helpful" info ( < g > ) about the Office
library, I agree with Cheryl!

--
Ken Snell
<MS ACCESS MVP>

Cheryl Fischer said:
Any ideas?

Yep. Use the code at http://www.mvps.org/access/api/api0001.htm.

Quoting a post from earlier this week by Access MVP Allen Browne:

"Although there is a FileDialog object in the later versions [of Access],
that's not a
good way to go. Requires a reference to the Office library. Obviously won't
work with older versions. Won't work with mde/runtimes. And does not work at
all for Save As, even though it offers that in the Intellisense."



--

Cheryl Fischer, MVP Microsoft Access
Law/Sys Associates, Houston, TX


Chaplain Doug said:
MS Access 2002 VBA help gives me code to produce the
Open/Save window. But,

Dim fd As FileDialog

Get the error message "User-defined type not defined"

Any ideas?
 
<BG>

--

Cheryl Fischer, MVP Microsoft Access
Law/Sys Associates, Houston, TX


Ken Snell said:
And even though I posted the "helpful" info ( < g > ) about the Office
library, I agree with Cheryl!

--
Ken Snell
<MS ACCESS MVP>

Cheryl Fischer said:
Any ideas?

Yep. Use the code at http://www.mvps.org/access/api/api0001.htm.

Quoting a post from earlier this week by Access MVP Allen Browne:

"Although there is a FileDialog object in the later versions [of Access],
that's not a
good way to go. Requires a reference to the Office library. Obviously won't
work with older versions. Won't work with mde/runtimes. And does not
work
at
all for Save As, even though it offers that in the Intellisense."
 
Back
Top