Quote:
Originally Posted by lynnchester
I would like to display a file dialog using vba, so that the user can select a file and path. I copied and pasted the MS example to test, but can't get past the declaration; I get an error saying "Compile error: User defined type not defined" and the text "fd as FileDialog" in my declaration is highlighted. This says to me that I'm missing a reference - but which one??
Which version of Access are you using please? for instance if it is ACC 2002 then
Microsoft Office 10.0 Object Library If it is ACC 2003 then
Microsoft Office 11.0 Object Library.
Please note various functionality is always going to be version dependant. For instance if you were using Access version 1 or 2 then this functionality would not be available and you would be calling on the windows application programming interface (API) to achieve the same thing. It is only with progressive development and later versions that hitherto complex modules are reduced to single commands like..............FileDialog
So as mentioned in para 1 if you are using ACC 2003 then go into the VBA module TOOLS...REFERENCES ensure that the library is selected and ticked in the list.
Regards
Jim :)