Run VBscript using Macro

angel007

New member
Local time
Today, 02:17
Joined
Jun 5, 2012
Messages
6
Hi,

Please can anyone help me to Run a vbscript using macro. I am new at this and definately missing something thats not letting me run the macro.

I am selecting RunApp and in Command Line this is what i am writing ShellExecute("C:\Documents and Settings\admin\My Documents\Test\Test.vbs")

when i double click the Macro this is the error message i get " microsoft access can't invoke the application using the runapp action"

Also i need to know how to Run a vbscript using command button (with vba coding). - Should i post this question on a seperate Thread?

Please let me know

Thanks!
 
VBA has a Shell() function. Do you mean that? Otherwise I don't think there is a ShellExecute() method available inside Access with making an API call.
 
yes shell ()function. But I am not sure if i am suppose to use it over there.

If you know any other way to Run a vbscript please let me know.

Thanks!
 
Try this code . . .
Code:
CreateObject("WScript.Shell").Run "C:\script.vbs"
 
When i run the above code i get "Invalid Procedure Call or argument" Error
 
I figured it out... I could get macro working so I am runing it via comand button

Shell "WScript " & """C:\Documents and Settings\admin\My Documents\Test\test.vbs"""

Thanks Mark for all your help
 

Users who are viewing this thread

Back
Top Bottom