MATLAB: Am I getting the error ‘ActiveX component can’t create object’ when I try to run an Excel Builder application

activexbuildercomponentexcelMATLAB Builder EX

I created an Excel Builder application, packaged it, and distributed the application to another computer. I ran the MGLINSTALLER and added the matlabroot\bin\win32 directory to the path as directed in the Excel Builder documentation. I then try to run the macro in Excel and receive the error:
 
ActiveX component can't create object

Best Answer

This error indicates that the mwcomutil.dll and the component DLL are not registered on the target computer. To use the Excel macro, you need to first register these two DLLs using MWREGSVR.EXE that is packaged with the Excel Builder application.
In DOS, you can execute the following commands (assume the component DLL is mycomp_1.dll):
 
mwregsvr mwcomutil.dll
mwregsvr mycomp_1.dll
This information is documented in the Excel Builder User's Manual under 'Packaging and Distributing the Component':