Excel .NET COM – Automation error. The system cannot find the file specified

calendar_today Asked May 19, 2009
thumb_up 11 upvotes
history Updated April 16, 2026

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)

+11 upvotes ranks this answer #67 out of 167 excel solutions on this site .