Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

run msaccess vba module from vbs

Status
Not open for further replies.

longhair

MIS
Feb 7, 2001
889
0
0
US
morning all,

is there a way to call an access vba module from vbs?
the idea here is to write a vbs script and make it a scheduled task. at the appropriate time it would run the access vba code.

thanks in advance.

regards,
longhair
 
The /x command line switch may suit.
 
Remou & PHV,
thanks. knew about the /x to run a macro but was hoping to have this run more in the backround rather than actually opening access to call the macro. i'll poke around some more.
regards,
longhair
 
It depend on the module. If it is used to update tables or such like, you can write something similar using ADO and Jet and not go near Access.
 
Remou,
that would be a project for the future. would require an awful lot of code that i am not yet familar with.
i will probably go with the macro option and look at doing the recode way down the line.
regards,
longhair
 
morning all,

is there a way to call an access vba module from vbs?
the idea here is to write a vbs script and make it a scheduled task. at the appropriate time it would run the access vba code.

thanks in advance.

regards,
longhair

Yes, if you use the "Access.Application" object

Function Run(Procedure As String, [Arg1], [Arg2], [Arg3], [Arg4], [Arg5], [Arg6], [Arg7], [Arg8], [Arg9], [Arg10], [Arg11], [Arg12], [Arg13], [Arg14], [Arg15], [Arg16], [Arg17], [Arg18], [Arg19], [Arg20], [Arg21], [Arg22], [Arg23], [Arg24], [Arg25], [Arg26], [Arg27], [Arg28], [Arg29], [Arg30])
Member of Access.Application

>

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top