How can I calling a Subroutine from Microsoft Access?
이전 댓글 표시
I have a subroutine in Microsoft Access that is not a macro (it is contained in a module.) I searched and found this previously but it is used for macros. http://www.mathworks.com/matlabcentral/newsreader/view_thread/34936
I also looked up the application.Run method http://msdn.microsoft.com/en-us/library/office/ff193559.aspx
My access subroutine in the module is as follows.
Public Sub Test()
MsgBox "Hello", vbOKOnly
End Sub
My MATLAB code is as follows
Access = actxserver('Access.Application');
invoke(Access,'OpenCurrentDatabase','PathName');
invoke(Access,'Run', '"Test"');
invoke(Access.DoCmd,'Quit');
Then I get
Description: You made an illegal function call.
Error in ==> TestScripts at 3 invoke(Access,'Run','"Test"');
답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 ActiveX에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!