04-18-2016, 07:58 AM
Hello
I would like to connect an open MS Access File to execute a Function.
Someting like this in VB(A) Script:
Dim oApp As Access.Application
Set oApp = GetObject("C:\Folder\File.accdb")
Debug.Print oApp.Run("QM_Test", 123)
I tried this:
typelib MsAcc "C:\Programme\Microsoft Office\Office12\MSACC.OLB"
MsAcc.Application oApp
oApp = GetObject("C:\Folder\File.accdb") (Error: expected 3 to 3 arguments, not 1.)
VARIANT* f = &oApp.Run("QM_Test", 123) (Error: expected VARIANT* tip: use operator & to get address of variable, or operator + to cast type.)
Help is welcome. Thanks
I would like to connect an open MS Access File to execute a Function.
Someting like this in VB(A) Script:
Dim oApp As Access.Application
Set oApp = GetObject("C:\Folder\File.accdb")
Debug.Print oApp.Run("QM_Test", 123)
I tried this:
typelib MsAcc "C:\Programme\Microsoft Office\Office12\MSACC.OLB"
MsAcc.Application oApp
oApp = GetObject("C:\Folder\File.accdb") (Error: expected 3 to 3 arguments, not 1.)
VARIANT* f = &oApp.Run("QM_Test", 123) (Error: expected VARIANT* tip: use operator & to get address of variable, or operator + to cast type.)
Help is welcome. Thanks