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

non_Microsoft COM object issue 2

Status
Not open for further replies.

Cloonalt

Programmer
Jan 4, 2003
354
US
I programmer here wrote a COM object with a non-Microsoft platform (Delphi-Borland). I'm using it in VB 6 and can't get intellisense.

I use:

Dim Obj as Object
Set Obj = CreateObject("GwapiAutoMail.SendEmail")

He says:

"My sample script is using late binding (because most vb scripts vars default to variant)."


Any help is appreciated.


 
It is using late binding. When you have a variable declared As Object, that's late binding. I would suggest you click Project -> References, then look for the object in the list. Select it. Then, you should be able to change your code to:

Dim Obj as GwapiAutoMail.SendEmail
Set Obj = CreateObject("GwapiAutoMail.SendEmail")

This will use early binding and intellisense should begin working.

-George

Strong and bitter words indicate a weak cause. - Fortune cookie wisdom
 
If you think about it, Intellisense requires that the IDE know what kind of object it's dealing with. If you set your variable as an Object, the compiler figures it out when you compile, not before. That's why you have to "strongly type" your variable; meaning you have to explain in "no uncertain terms" what the type of the variable is.

HTH

Bob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top