Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Display and Use the File dialog box

Status
Not open for further replies.

lcky

Programmer
Sep 29, 2005
30
0
0
GB
Hi
I am using Microsoft Access 2003.
I have a test form with a listBox field and a button.
On Button cmdFileDialog_Click(); I have following code.

Private Sub cmdFileDialog_Click()
Dim fDialog As Office.FileDialog
Dim varFile As Variant
....
....
End Sub

I have also added "Microsoft Office 11.0 Object Library " in References code database window.

When I click on button, i am getting error saying "User-defined type not defined".

I am lost here.

Please you suggest any idea.

Many thank
 
I have also tried to declare like below;

Dim fDialog As FileDialog

but still getting same message.


cheer
 
Does intellisense show FileDialog as an option when it drops down? Your error message suggests that FileDialog is not the correct name of the class, but I am not familiar MS Office 11 object library, so I am only speculating.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top