|
-
Oct 20th, 1999, 09:44 PM
#1
Thread Starter
Addicted Member
Can anyone show me how I can run a macro from within VB without having to open Access 97 ?
-
Oct 20th, 1999, 10:12 PM
#2
Guru
This should work (i didn't test it though..)
1) Add a reference to the Microsoft Access 8.0 Object Library
2) Add this code:
Dim axs As New Access.Application
axs.OpenCurrentDatabase ("c:\file\path\here.mdb")
axs.DoCmd.RunMacro "MacroName"
axs.CloseCurrentDatabase
Set axs = Nothing
All done!
HTH
Tom
-
Oct 20th, 1999, 10:49 PM
#3
Thread Starter
Addicted Member
Thank you Clunietp, that worked fine.
Regards
nmretd
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|