Run VBScript file from within Access

  • Thread starter Thread starter Dale Fye
  • Start date Start date
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
 
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.
 
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
 
All variables in VBScript are variants, so if you declare them that way
the code should work.
 
Back
Top