User Profile
dmarg514
Copper Contributor
Joined Oct 18, 2021
User Widgets
Recent Discussions
Excel add-in - Why must VBA project be compiled first??
I have written a VS solution that contains: 1) A C# project for an Excel document-level add-in. The project contains the XLSM file. 2) A Windows Installer project for installing the add-in The XLSM file (included in the installation) contains some VBA macros written to interface with the C# side. My problem arises once I install the add-in, open the XLSM file, and run a macro. The standard VBA error "Can't find project or library" pops-up. If I then go into the developer Visual Basic editor and compile the project (Debug > Compile VBAProject) no errors are reported. However, if I rerun the macro it works just fine. What is going on here? Why does compiling the VBA fix enable the macros to work even though there were no errors to be found? And how can I include an XLSM in my Windows Installer project that works out of the box? Please help!1.2KViews0likes0CommentsExcel 2013 Document-Level Add-In Not Working in Excel for Office 365
I've written an Excel 2013 add-in in C#. There are also some VB macros embedded in the specific Excel spreadsheet (from which the VS project was created) for interfacing with the C# project. I also created an installer for the add-in using https://docs.microsoft.com/en-us/previous-versions/visualstudio/visual-studio-2010/ff937654(v=msdn.10). Once I run the installer, I can open the spreadsheet (an XLSM file) in Excel 2013 and run one of my macros, which in turn calls some C# code. This works fine. When I open the XLSM file in Excel for Office 365 I get a VB error saying it can't find the project/library. If I go into the Visual Basic editor > Tools > References, I can see that there is a MISSING reference and the path given is DESTINATION_DIRECTORY\{C804DD24-544E-4DC8-A4C6-02F8B961D50A}. This last part seems like an Interops component ID but I'm not sure for what. Any help would be GREATLY appreciated.694Views0likes0Comments
Recent Blog Articles
No content to show