Question posted 2009 · +13 upvotes
I have a .NET 2.0 COM object that’s used by VBA in Excel. It works fine on my dev machine, but when trying to use it on a clean VM workstation I get this error:
Automation error. The system cannot find the file specified.
The dll is registered with “regasm /tlb /codebase mycom.dll” and not put in the GAC. I don’t have administration rights on the VM box
Any ideas?
Accepted answer +11 upvotes
You need to either invoke regasm with the full path to the assembly as the codebase parameter value or put the assembly into some location which is always on the path for searching libraries. Otherwise it will not be found when the client tries to instantiate the COM object.
Top excel Q&A (6)
- Shortcut to Apply a Formula to an Entire Column in Excel +335 (2011)
- How should I escape commas and speech marks in CSV files so they work in Excel? +136 (2012)
- Convert xlsx to csv in linux command line +96 (2012)
- How to create a link inside a cell using EPPlus +50 (2011)
- IF statement: how to leave cell blank if condition is false ("" does not work) +44 (2013)
- T-SQL: Export to new Excel file +44 (2012)
excel solutions on this site
.