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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error in VB6 1

Status
Not open for further replies.

010101010101010

Programmer
Oct 6, 2005
5
BA
When I wrote like this
dim db As database or enithing like " dim * as *" I can't run program. I got this message "user-defined type not defined
 
I would suggest checking your references and seeing if any of them are are marked as 'Missing'

Hope this helps

HarleyQuinn
---------------------------------
Get the most out of Tek-Tips, read FAQ222-2244 before posting.
 
For the example you quoted I think you might not have checked the reference to the Microsoft DAO x.x Obkect Library.

As for not letting you dim ANYTHING else I would (as above) check for missing references.

HarleyQuinn
---------------------------------
Get the most out of Tek-Tips, read FAQ222-2244 before posting.
 
Thank for help. I will see what I can do. I have problem with instalation of VB6 I think that is problem.
 
Could well be.

HarleyQuinn
---------------------------------
Get the most out of Tek-Tips, read FAQ222-2244 before posting.
 
When I download a project from internet it work. But if I wrote own then I recivered the message "not defined
 
Did you check the references?

HarleyQuinn
---------------------------------
Get the most out of Tek-Tips, read FAQ222-2244 before posting.
 
<"user-defined type not defined"

This means any of three things:

1. You haven't referenced the library that defines the type
2. You fat-fingered the name of the type
3. You really did try to define a type, and forgot to.

The error is descriptive of the third possibility, which virtually never happens. The error looks for an existing type, then assumes that the user defined one (using the Type statement) and that it isn't there.

So, while not very descriptive, it's generally easily traceable to reason number 1. Much nicer error to have than, say, "ActiveX control can't create object" which we all know and love.

Bob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top