By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,283 Members | 1,721 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,283 IT Pros & Developers. It's quick & easy.

Calling Procedure From Command Line?

P: n/a
Okay, here's the bonehead question of the day:

Is there some syntax or command line switch that I can use to call a
Public Sub from a command line? If so, what is the syntax?

The purpose: if I can start the Sub from a command line prompt, then I
can make the command a batch file. If I can make the command a batch
file, I can schedule it.

If the sub were, say, basMyProcedureModule.MySubName, could I invoke it
by doing something like this:

"C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE" /myswitchhere
"C:\MyDataFiles\MyFile.mdb!basMyProcedureModule!My SubName"
May 4 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
It goes like this:

You create a macro with a RunCode action that calls the function,
and then you go:

"C:\Program Files\Microsoft Office\Office11\msaccess.exe"
"C:\MyFilePath\MyDatabaseName.mdb" /X MyMacroName

And save it as a .bat

Fester Bestertester wrote:
Okay, here's the bonehead question of the day:

Is there some syntax or command line switch that I can use to call a
Public Sub from a command line? If so, what is the syntax?

The purpose: if I can start the Sub from a command line prompt, then I
can make the command a batch file. If I can make the command a batch
file, I can schedule it.

If the sub were, say, basMyProcedureModule.MySubName, could I invoke it
by doing something like this:

"C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE" /myswitchhere
"C:\MyDataFiles\MyFile.mdb!basMyProcedureModule!My SubName"

May 4 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.