Excel VBA to .NET
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: Excel VBA to .NET

  1. #1
    Join Date
    Apr 2002
    Location
    USA (all the way!!)
    Posts
    55

    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
    Location
    USA (all the way!!)
    Posts
    55

    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
  •  


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center