Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Executing a VBS Script from Access 2000

Status
Not open for further replies.

Rich75

Technical User
Jun 13, 2003
22
GB
Hi could anybody tell me how to fire off a vbs script from access.....

thanks

Rich
 
Hi i have tried Shell

Public sub
dim retval
retval = ("c:\test.vbs")

end sub

this gives me an error of

runtime error '5':
invalid procedure call or argument
 
Hello Rich75,

Should it not be ?

dim retval As Integer
retval=Shell("c:\test.vbs")

regards - tsuji
 
Hi tsuji

Yes sorry typo on my part
that still gives the same error

however i changed the code to call a .bat script
the .bat script then calls the vbs script

i have used as a work around.

if you have any ideas why it will not call the vbs script directly i would appreciate it


thank

Rich
 
Hello again,

Would an explicit call to wscript or cscript platform do?

retval=Shell("wscript c:\test.vbs")

with all the path implicitly set. If yes, it could just be an unsettled association.

- tsuji
 
Have you tried something like this:|code]
retval=Shell("cscript c:\test.vbs")|/code]

Hope This Help
PH.
 
brilliant that done it

thanks alot for all your help
 
Hi does anybody have a script where you can display the cursor as an hourglass while the script runs ?

thanks

Rich
 
Can you do it in your Access VBA before to run the script minimized ?

Hope This Help
PH.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top