Why am I getting the error 'ActiveX component can't create object' when I try to run an Excel Builder application?

13 views (last 30 days)
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:
ERROR: ActiveX component can't create object

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 11 Oct 2021
Edited: MathWorks Support Team on 17 Nov 2021
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\nmwregsvr mycomp_1.dll
This information is documented in the Excel Builder User's Manual under 'Packaging and Distributing the Component':
https://www.mathworks.com/help/compiler/magic-square-example-c-c-developer-tasks.html

More Answers (0)

Products


Release

No release entered yet.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!