473,385 Members | 2,004 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Error message with declaring variable as a FileDialog

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.

4 6150
TheSmileyCoder
2,322 Expert Mod 2GB
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
32,556 Expert Mod 16PB
From the VBA window select :
Tools / References and search down the list for the appropriate reference.
Jan 26 '10 #3
Busbait
18
Thanks .......... it works fine now
Jan 26 '10 #4
NeoPa
32,556 Expert Mod 16PB
Cool. Thanks for letting us know :)
Jan 27 '10 #5

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

Similar topics

4
by: ulysses | last post by:
Hi, I use PyQt 3.8 non-commercial version in win32. I get a big question. I Can't show PY variable in QT filedialog as initially parameter. Code sample is following:...
3
by: John Field | last post by:
Hello, Is it possible to exclude certain files in a wx.FileDialog, so that the user won't see them and can't select them with the mouse in de File open window? I was thinking of somehow...
6
by: Peter Frost | last post by:
Please help I don't know if this is possible but what I would really like to do is to use On Error Goto to capture the code that is being executed when an error occurs. Any help would be much...
1
by: Brenda | last post by:
Look at the following code: Private Sub cmdEnter_Click() Dim fd As FileDialog Set fd = Application.FileDialog(msoFileDialogOpen) Dim vrtSelectedItem As Variant With fd If .Show = -1 Then...
12
by: James Lankford | last post by:
Hello group: I have reached the end of my rope with this error. I have pretty much tried every suggestion I've found thus far and I get this error no matter what I do. I did try using the CDOSYS...
7
by: Brett | last post by:
I'm not sure why I keep getting this error, "Object reference not set to an instance of an object". Private Function somefunction() as string Dim MyCurrentClass As New Class1 Try For i As...
7
by: Fir5tSight | last post by:
Hi All, I used the following code in C#: using System.Drawing; //blah blah blah Bitmap bmp = new Bitmap();
6
by: Bobrick | last post by:
Hi. Thanks to everyone who replied to my last post, it turns out it wasn't the line where I was trying to treat the variable in question as an array which was the problem, but the line above. ...
0
by: Ducknut | last post by:
Hi all, Thanks in advance, I have form in an access db (Access 2000) that users can use to (hopefully) import a raw .txt file into access. The user clicks a button and a FileDialog opens to select...
4
by: Jerry West | last post by:
I am new to VB .NET moving from VB6. I wrote the following code and as a result I received an error concerning it from the IDE. I don't understand why I get the message or why that what I am doing...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.