Run VBScript from Excel

A

Amy M

I would like to have a user select a button on an Excel worksheet to run a
VBScript. Can this be done?
 
R

ruic

Here's an example that launches Calculator:

' Specifying 1 as the second argument opens the application in
' normal size and gives it the focus.
Dim RetVal
RetVal = Shell("C:\WINDOWS\CALC.EXE", 1) ' Run Calculator
 
A

Amy M

Thanks, it worked with "WScript.exe C:\Temp\TestKeys.vbs" as the parameter.
I appreciate the help.
 

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