Windows Vista Forums

.NET in VBA
  1. #1


    NooS Guest

    .NET in VBA

    I working with vb.net 2005. I created a Class Library project and add a COM
    Class to the project. I set COM interoperability, and COM visibility of the
    project.
    Also I set a strong name of assembly.
    I compile all in a dll file.
    Now, if I refer it in Excel 2003 VBA macro I view method and properties
    correctly, but if I run the macro, VBA say me that dll class not found.
    Why?



      My System SpecsSystem Spec

  2. #2


    Cowboy \(Gregory A. Beamer\) Guest

    Re: .NET in VBA

    Have you stored the assembly in the GAC and registered it using Regasm? If
    not, there is why you are not seeing it.

    --
    Gregory A. Beamer
    MVP, MCP: +I, SE, SD, DBA

    *************************************************
    | Think outside the box!
    |
    *************************************************
    "NooS" <NooS@xxxxxx> wrote in message
    news:F3FA088E-8663-4CDD-B41C-188302C4C6CE@xxxxxx

    >I working with vb.net 2005. I created a Class Library project and add a COM
    > Class to the project. I set COM interoperability, and COM visibility of
    > the
    > project.
    > Also I set a strong name of assembly.
    > I compile all in a dll file.
    > Now, if I refer it in Excel 2003 VBA macro I view method and properties
    > correctly, but if I run the macro, VBA say me that dll class not found.
    > Why?


      My System SpecsSystem Spec

  3. #3


    NooS Guest

    Re: .NET in VBA

    Now, I temporary copy the dll file in Excel.exe directory and VBA found my
    library, but when I run the VBA macro now say me that "The format of file
    'myDLL' is not valid".

    In the .NET project COM interoperability, and COM visibility are correctly
    setting.
    What is wrong?

    "Cowboy (Gregory A. Beamer)" wrote:

    > Have you stored the assembly in the GAC and registered it using Regasm? If
    > not, there is why you are not seeing it.
    >
    > --
    > Gregory A. Beamer
    > MVP, MCP: +I, SE, SD, DBA
    >
    > *************************************************
    > | Think outside the box!
    > |
    > *************************************************
    > "NooS" <NooS@xxxxxx> wrote in message
    > news:F3FA088E-8663-4CDD-B41C-188302C4C6CE@xxxxxx

    > >I working with vb.net 2005. I created a Class Library project and add a COM
    > > Class to the project. I set COM interoperability, and COM visibility of
    > > the
    > > project.
    > > Also I set a strong name of assembly.
    > > I compile all in a dll file.
    > > Now, if I refer it in Excel 2003 VBA macro I view method and properties
    > > correctly, but if I run the macro, VBA say me that dll class not found.
    > > Why?
    >
    >
    >

      My System SpecsSystem Spec

.NET in VBA problems?