Why do I get "Dispatch : Error loading type library/DLL." when using MATLAB's ActiveX interface?

3 views (last 30 days)
Why do I get "Dispatch : Error loading type library/DLL." when using MATLAB's ActiveX interface?
hacc = actxserver('Access.Application')
hacc =
activex object: 1-by-1
hopen = invoke(hacc,'opencurrentdatabase',[pathname,filename])
hopen =
-1
set(hacc,'Visible','0')
ans =
activex object: 1-by-1
hWksp = get(hacc.DBEngine,'Workspaces')
The last line of code produces the following error:
??? Dispatch : Error loading type library/DLL.
Error in ==> P:\Program\matlab61\toolbox\matlab\winfun\@activex\private\actxcli.dll
Error in ==> P:\Program\matlab61\toolbox\matlab\winfun\@activex\get.m
On line 15 ==> varargout{1} = actxcli('get', varargin{1}.Handle,varargin{2:end});
Error in ==> P:\Program\matlab61\toolbox\matlab\winfun\@activex\subsref.m
On line 24 ==> B = get(A,S(idx).subs);

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 5 Mar 2013
This error normally relates to improper installation of the type library of the product which you are using as the ActiveX server. This can usually be solved by reinstalling the application you are using as the server. If this does not help, if possible, please try to write a similar code in Visual Basic and see if that produces a similar error.
If the test in VB runs fine, please contact MathWorks Technical Support with the following information:
1) The output of executing the "ver" command at the MATLAB Command Window.
2) A small script file to reproduce the problem.
3) Information about the ActiveX object that you are using.

More Answers (0)

Products

Community Treasure Hunt

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

Start Hunting!