COM Component in Visual C++ 6 Macro

Posted on 2006-04-07
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


    Public Sub Demo()
        Dim Excel

        Set Excel = CreateObject("Excel.Application")

    good luck :)
    LVL 8

    Assisted Solution

    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

    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 run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
      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 …
    The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
    The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

    745 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

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now