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

How do I Instantiate / use an OCX control in Office VBA

Status
Not open for further replies.

SBendBuckeye

Programmer
May 22, 2002
2,166
US
Client has an OCX with no source code (they lost the code somewhere along the line before my time). They are using it to interface into MS Project from a form (written in Uniface) which allows external OCX calls but no external DLL calls. They call it to add a resource or a task, etc.

If I add the OCX file to the References collection in VBA, I can see the properties, methods and Declare statements using the object browser.

How do I instantiate or link to an object? It will let me Dim it but I get an error when I try to use the NEW keyword.

Also, how do I reference its methods? If I put the object on a form I cannot then see the methods which are displayed in the browser.

Thanks in advance for any help and or suggestions you can give me! Have a great day!

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top