由网友(孤独是我妻)分享简介:在VBA / VB6我可以调用一个函数或子程序,像这样:In VBA/VB6 I can call a function or a subroutine like so:Call myFunction我堵到从.NET中访问应用程序,像这样:I am plugging into an Access applicat...
在VBA / VB6我可以调用一个函数或子程序,像这样:
In VBA/VB6 I can call a function or a subroutine like so:
Call myFunction
我堵到从.NET中访问应用程序,像这样:
I am plugging into an Access application from .Net like so:
using MSAccess = Microsoft.Office.Interop.Access.Application;
var access = new MSAccess();
access.OpenCurrentDatabase(@"C:myDatabase.accdb");
access. //Here I can more or less type my VBA code the same way I can natively
access.CloseCurrentDatabase();
Marshal.ReleaseComObject(access);
什么我放点后通过MS接入互操作调用 myFunction的
?
推荐答案
看看的 Application.Run 你想要做什么的基础上,在链接中给出的例子。
See if Application.Run does what you want, based on the example given in the link.
修改:另外,的 DoCmd.RunMacro
应该工作。
EDIT: Also, DoCmd.RunMacro
should work.
相关推荐
最新文章