problem with file dialog

K

Keith

Hello,
I need to use the file picker dialog, and from Access help I obtained code
that has the following line.

Dim fd As FileDialog

Unfortunately, it results in a “user defined type not defined†error.
What is the solution here?

Thank you,

Keith
 
D

Douglas J. Steele

Do yourself a huge favour and forget about using the FileDialog. Instead,
use the all-API approach demonstrated in
http://www.mvps.org/access/api/api0001.htm at "The Access Web".

The FileDialog has problems (there are certain things that it's supposed to
do that it doesn't actually do), and there can be issues if your users'
machines aren't on exactly the same version of service packs as the machine
on which the application was developed.

If you're determined to use the FileDialog, go into the VB Editor, select
Tools | References from the menu and scroll through the list of available
references until you find the one for Microsoft Office n.0 Object Library
(where n is 8 for Office 97, 9 for Office 2000, 10 for Office 2002, 11 for
Office 2003 and 12 for Office 2007). Select that reference and back out of
the dialog.
 
K

Keith

HI Doug,
Thanks very much.
That is indeed helpful. I'll check out the all-API approach.
Keith
 

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

Top