[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now


COM Component in Visual C++ 6 Macro

Posted on 2006-04-07
Medium Priority
Last Modified: 2010-04-01
Hi.  Is it possible to reference and use a COM/ActiveX component in a VB macro for Microsoft Visual C++ 6.0?  If so, how?  Thanks.
Question by:deatc
LVL 20

Accepted Solution

ikework earned 672 total points
ID: 16402870

Public Sub Demo()
    Dim Excel

    Set Excel = CreateObject("Excel.Application")

good luck :)

Assisted Solution

mrblue earned 664 total points
ID: 16428221
Likely the component itself has to be automation component, what means it must to implement dual COM interfaces (derived from IDispatch) and to use automation data types (no structures as parameters for example). It is usually true for script languages.
LVL 11

Assisted Solution

by:Deepu Abraham
Deepu Abraham earned 664 total points
ID: 16467576
All the COM components derived from IDispathch (Automation Server) can be called from the VB script.CreateObject() function will do the trick.

Best Regards,

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
Article by: evilrix
Looking for a way to avoid searching through large data sets for data that doesn't exist? A Bloom Filter might be what you need. This data structure is a probabilistic filter that allows you to avoid unnecessary searches when you know the data defin…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

873 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question