我正在尝试“编译”Access ADP文件以获取带有小vbs脚本的ADE。
Option Explicit
Const acCmdMakeMDEFile = 603
Const msoAutomationSecurityLow = 1
Dim AccessADP
Set AccessADP = CreateObject("Access.Application")
AccessADP.AutomationSecurity = msoAutomationSecurityLow
AccessADP.visible=false
AccessADP.OpenCurrentDataBase(SourceOfADP)
我需要调用一个子函数和一个写在ADP中的函数...对于子函数
AccessADP.Run "nameOfTheSub"
但是我无法使用该函数(必须返回一个数值)。 Access功能非常简单
public function getValue() as Integer
getValue=10
end function
这些解决方案都不适合我
dim returnValue
set returnValue = AccessADP.Run "getValue"
dim returnValue
returnValue = AccessADP.Run "getValue"
从vbs中捕获函数返回值的任何想法?
提前致谢