Specifically, you use the RunCode action in the macro (let's call it
AutoRun) to run the function. In the command line, you use the /X switch to
run the macro:
C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE C:\My
Documents\RemoteMacro.mdb /xAutoRun
--
--Roger Carlson
MS Access MVP
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L
"Allen Browne"
news:umNIfXaEIHA.4772@TK2MSFTNGP02.phx.gbl...
> Change the Sub into a Function.
>
> You can then use RunCode in your macro to fire it off.
>
> --
> Allen Browne - Microsoft MVP. Perth, Western Australia
> Tips for Access users - http://allenbrowne.com/tips.html
> Reply to group, rather than allenbrowne at mvps dot org.
>
> "Raymond"
> news:03973B28-8B83-4452-959E-39EB6965DFCB@microsoft.com...
>>I have a working sub procedure, it is called: Sub SendMessage()
>>
>> I do not know to much about VB so details would be appreicated.
>>
>> I am trying to create a macro that kicks off this sub code (procedure)
>> when
>> the DB is opened from a Windows Scheduled Task.
>>
>> Thanks,
>>
>> Raymond
>