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 SkipVought 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 invoke methods in a custom made ActiveX component?

Status
Not open for further replies.

arnoldw

Programmer
Sep 25, 2007
17
0
0
DK
I have written a custom ActiveX component and I inserted it into a user from in Excel. How do I go about to invoke methods that the ActiveX component exports? Also, how do I subscribe to events from the ActiveX component? If anybody could refer me to an online tutorial or provide snippets of code I would be most grateful. I am a beginner VBA programmer, please have that in mind when replying.
 
Could you explain in a bit more detail?

What do you mean, exactly, by "written a custom ActiveX component"? Please tell us, exactly, what you have done.

An "ActiveX component" sounds like it could be a COM component, a DLL. It this true?

Also, what does "I inserted it into a user" actually mean? <joke>You injected it????</joke>

faq219-2884

Gerry
My paintings and sculpture
 
Gerry: I inserted it into a user-form

Rgds, Geoff

We could learn a lot from crayons. Some are sharp, some are pretty and some are dull. Some have weird names and all are different colours but they all live in the same box.

Please read FAQ222-2244 before you ask a question
 
Oooops.

I read it as:

"I inserted it into a user from (in) Excel". As in, "I inserted it into a user from Excel".


Doh...dumb me. arnoldw, ummmm, forget that question.

The question regarding the ActiveX component still stands.

faq219-2884

Gerry
My paintings and sculpture
 
Thanks for replying. I will try to clarify a bit. I used the following example as my starting point for the ActiveX component and it is still in progress:


I'm not sure if it is a COM component or not, the .ocx file gets registered when I build the project and then I can select it among available ActiveX component in the VBA editor in Excel. When I am finished with my ActiveX component it will have some buttons, check boxes and some text fields. Please note that these controls will reside in the "green plot area" (please see picture on the web page linked to above), not in the Plot Control Properties form. When I push a button, I would like to generate an event to the VBA code and I would like to have a procedure in the VBA code that is able to set the text in text fields. That is what I mean by invoking methods (the VBA code would call something like setTextFieldText) and subscribing to events (the VBA would subscribe to events like buttonPressedEvent). How are these things done in VBA? If my question is still too vague or some vital information is missing, please let me know.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top