469,347 Members | 1,738 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,347 developers. It's quick & easy.

Open an Access database and Execute a VBA Module

From VB.Net, I want to open an Access database and run VBA module that
resides in the Access database. .Net gives me the error message that Access
can't find the VBA Module.

'StartCode

Dim appAccess as Access.Application
Dim strProc as String = "RunTest.myProc"

appAccess = CreateObject (Access.Application)
appAccess.OpenCurrentDatabase("C:\Documents and Settings\My
Documents\DB.mdb", False)
appAccess.Visible = True

'This is the problem statement:
AppAccess.Run(strProc)
'.Net gives me the error message: "Microsoft Access can't find the procedure
'RunTest.myProc.'." - For some reason there is an extra "." after myProc
which I don't know why its there

appAccess.Quit
appAccess = Nothing

'End Code

Thank you for your help
Mark
Jul 21 '05 #1
0 1104

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by Serious_Practitioner | last post: by
5 posts views Thread by scorpion53061 | last post: by
9 posts views Thread by pic078 via AccessMonster.com | last post: by
5 posts views Thread by Chuck Anderson | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by suresh191 | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.