Click to See Complete Forum and Search --> : VB IntelliSense


Samantha
February 21st, 2000, 01:57 PM
A colleague of mine is experiencing some problems with the IntelliSense in VB 6.0. Here is the scenario...

He creates a class module. The class module has public properties and procedures...

From an existing class module, he declares and instantiates the new class. No evident spelling errors. The new class object is instantiated in the Class Initialize event of the existing class and declared at module level. This should allow the developer to view any public properties or procedures residing in the new class...This is not the case. For some reason the IntelliSense does not work.

My question is...

Has anyone else experienced this type of reaction from the VB IntelliSense before?????? Any ideas of what to do.

Thanks,
Sam

Kyle Burns
February 21st, 2000, 02:08 PM
Make sure there is a reference set to the project.

Samantha
February 21st, 2000, 02:13 PM
The reference has been set. The odd thing about the problem is this;

Say you have two class modules...
You add a new class module
You declare and instantiate the new class object in both of the already existing classes...
In one class, the VB IntelliSense appears, giving you access to the new class' public properties and procedures...
In the other class, the VB IntelliSense does not appear...Keep in mind....NO SPELLING ERRORS

Any other ideas???

Kyle Burns
February 21st, 2000, 02:29 PM
Just another thought...
If his declaration doesn't specify the library, try fully qualifying the library. Instead of Dim oObject as Class1, try Dim oObject as Project1.Class1

Bruno
February 21st, 2000, 06:33 PM
There is a problem with declarations: undefined variable, missing reference or duplicate declaration.

VB won't always catch the 'duplicate declaration' problem - e.g. you can have 2 .bas modules with definition of RECT (Public Type RECT ...), your code will run OK, but IntelliSense will be 'confused'.

Lothar Haensler
February 22nd, 2000, 02:21 AM
>Has anyone else experienced this type of reaction from the VB IntelliSense before??????

Yes, I have experienced this before.

>Any ideas of what to do?
No, not really. Fully qualifying modules (as suggested) didn't help at all.
MSDN doesn't mention any problems about Intellisense that relate to our situation.

A workaround that we used:
Declare variables with explicit types and assign to these variables instead of using lots of dots, e.g. application.yourobject.yoursubobject....