running Access procedure from Excel
Works for me. Could this be a security issue where you need to enable macros
to be run? In Access 2003 I specifically have to click "Open" in a dialog
because it has code in it.
"savalou" wrote in message
oups.com...
Hello,
I'm trying to run a procedure in access using excel VBA. I set the
access object library reference and ran this code but it hangs on the
appAcc.run command; Run-time error '440': Method 'Run' of object
'_Application' failed.
Sub GetKenyaAPRdata()
Dim appAcc As Access.Application
Set appAcc = New Access.Application
appAcc.Visible = False
appAcc.OpenCurrentDatabase ("C:\PMS\PEPFARresults.mdb")
appAcc.Run "getdata_Kenya"
appAcc.Quit
Set appAcc = Nothing
End Sub
Thanks in advance!
Dave
|