CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2002
    USA (all the way!!)

    Excel VBA to .NET

    I have a VBA project that runs in Excel and communicates with IBM Personel Communications (PCOMM) and I would like to convert it over to .Net

    I don't need Excel for what I'm doing but still need the link to PCOMM.

    The VBA references the following:

    Visual Basic for applications

    MS Excel 11.0 Object Library

    OLE Automation

    MS Office 11.0 Object Library

    Public autECLSession As Object
    Public autECLPS As Object
    Set autECLSession = CreateObject("pcomm.autECLSession")
    Set autECLPS = CreateObject("pcomm.autECLPS")
    autECLSession.SetConnectionByName ("A")

    This code runs fine through the VBA running in Excel.

    However when I try to duplicate it in .NET I get an error message @ the line of:

    Public autECLSession As Object

    The error message is that it "Cannot Create the ActiveX Component"

    I duplicated the code and references but don't understand why it can create ActiveX in VBA but not .NET?

  2. #2
    Join Date
    Apr 2002
    USA (all the way!!)

    Re: Excel VBA to .NET

    Found the problem, I'm working on a 64 bit machine so I had to to change the Compile (Advanced Compile Options) "Target CPU" from "Any CPU" to "x86". Hope this helps out somebody else! OUCH! That left a mark!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

On-Demand Webinars (sponsored)

By using this site, you agree to the Privacy Policy