none
VSTO/VBA Excel project assembly present but not active during debugging RRS feed

  • Question

  • I new to VS-VB and have a fairly complicated VBA project in an Excel 2007 workbook that I am attempting to integrate with VS 2008-VSTO. In my first attempts to call to/from VBA I have been partly successful. However, now I find that when I debug the project (F5) the workbook loads without error but the first time I attempt to call to or from VB I get a VBA compiler error: "can't find project or library" with the "Property Get CalltoVSTOAssembly..." line highlighted. When I press OK, the VBA Project references dialog appears and shows all my desired references including the VSTO and assembly refs. Once I press OK I can then execute my calls to/from VB without further problems.

    while in debug mode I have found that

    Thisworkbook.vbproject.references("temp").fullpath

    returns an error saying my assembly is not registered. I have no idea what, if anything, this has to do with my error since I am only in debug mode.

    I believe that at some earlier point in my work this issue was not present so am thinking there is some simple explanation for eliminating this symptom. Any help would be greately appreciated.

    Sunday, July 15, 2012 10:44 PM

All replies

  • I new to VS-VB and have a fairly complicated VBA project in an Excel 2007 workbook that I am attempting to integrate with VS 2008-VSTO. In my first attempts to call to/from VBA I have been partly successful. However, now I find that when I debug the project (F5) the workbook loads without error but the first time I attempt to call to or from VB I get a VBA compiler error: "can't find project or library" with the "Property Get CalltoVSTOAssembly..." line highlighted. When I press OK, the VBA Project references dialog appears and shows all my desired references including the VSTO and assembly refs. Once I press OK I can then execute my calls to/from VB without further problems.

    while in debug mode I have found that

    Thisworkbook.vbproject.references("temp").fullpath

    returns an error saying my assembly is not registered. I have no idea what, if anything, this has to do with my error since I am only in debug mode.

    I believe that at some earlier point in my work this issue was not present so am thinking there is some simple explanation for eliminating this symptom. Any help would be greatly appreciated.

    <input id="c622c7f2-c201-4164-a888-054cdb3df1af_attachments" type="hidden" />
    Monday, July 16, 2012 11:13 PM
  • Hi SJT43,

    I am moving your thread into the Visual Studio Tools for Office Forum for dedicated support. Thanks for your understanding.

    Best Regards,


    Jack Zhai [MSFT]
    MSDN Community Support | Feedback to us

    Tuesday, July 17, 2012 4:45 AM