By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,971 Members | 900 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,971 IT Pros & Developers. It's quick & easy.

Error message with declaring variable as a FileDialog

P: 18
Hi

I am trying to declare a variable as a FileDialog object in VB for MS Access 2007

Dim fd As FileDialog

But, I am receiving an error message “ Compiler error : User-Defined type not defined”

Can you please help here?
Jan 25 '10 #1

✓ answered by TheSmileyCoder

You have to set a VBA reference to the Microsoft Office XX.0 Object library.

I don't know what XX version 2007 is, 2003 is 11.0 for comparision.

Share this Question
Share on Google+
4 Replies


TheSmileyCoder
Expert Mod 100+
P: 2,321
You have to set a VBA reference to the Microsoft Office XX.0 Object library.

I don't know what XX version 2007 is, 2003 is 11.0 for comparision.
Jan 25 '10 #2

NeoPa
Expert Mod 15k+
P: 31,419
From the VBA window select :
Tools / References and search down the list for the appropriate reference.
Jan 26 '10 #3

P: 18
Thanks .......... it works fine now
Jan 26 '10 #4

NeoPa
Expert Mod 15k+
P: 31,419
Cool. Thanks for letting us know :)
Jan 27 '10 #5

Post your reply

Sign in to post your reply or Sign up for a free account.