Run VBScript file from within Access

D

Dale Fye

One of my coworkers has written a VBscript file that he wants to execute
from a command button in Access.

I thought I could just Shell out to the file, but that didn't work, anybody
have any ideas
 
J

John Nurick

You probably need to shell to the VBScript interpreter, e.g.:

Shell "cscript.exe ""my vbscript.vbs""

But it's usually quite simple to convert a VBScript into a VBA procdure
which can be incorporated into your application.
 
D

Dale Fye

John,

See my post from today regarding Accessing Exchange data. One of my
coworkers found some code for accessing data on our exchange server. The
vbScript works fine when run from Explorer, but not when run from a shell
command. I would actually like to convert the code to Access, but none of
the variables are declared by type in the VBscript, so I'm having difficulty
making sense of it all.

Dale
 
J

John Nurick

All variables in VBScript are variants, so if you declare them that way
the code should work.
 
Top