Run code

C

Chris

Hi,

I want to run a special process every morning from Monday
to Friday is it possible to do it with VBA

My process is a VBA methode

Thanks
 
A

Andrew Backer

Well... unless someone can come up with a better way...

2 or 3 ways to do it :

1. Use Visual Basic (not access) and compile a basic exe with the method
in it. Chances are all the code will work pretty much unmodified. Then
just use windows scheduler to run it mon-fri.

2. Create a windows script file (.vbs). This will runn pretty much like
an ASP page (also vb script) w/o IIS or like a standalone VBA file
(which is what it is!). I don't recall if anything extra was required
other than the base windows install, but it should be available free
from MS if it is. Then just schedule it like normal in windows
scheduler again :

http://msdn.microsoft.com/library/d...n-us/script56/html/wsoriWindowsScriptHost.asp

I think most of the samples there are in JScript (.js), but there should
be enough info.

To test it, just make a "test.vbs" file (rename a .txt file?), and put '
msgbox "test wsh"' in it. Double clicking on it should pop up a message
box.

HTH,
Andrew Backer
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top