LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 857
Default Run a vbs file from MS-Excel

glad to hear you got it to work. :-)


--
Hope that helps.

Vergel Adriano


"XP" wrote:

Hi Vergel,

Experimenting with it, this is what finally worked:

Shell "WScript " & """MyPath\MyScript.vbs"""

Thanks again so much for your assistance; could not have cracked it without
your help!

"Vergel Adriano" wrote:

I tested it with a simple vbs script file that shows a message box and it
worked. Maybe try providing the full path to the script. Or in a command
prompt, go to the directory where the script is and type in

cscript Myscript.vbs

If you try to execute it from the command prompt does it work? I guess you
can also try using wscript just in case that makes a difference..

Maybe also check the version of cscript.exe and wscript.exe. I have v5.6
for both. Both files should be in the C:\windows\system32 folder.



--
Hope that helps.

Vergel Adriano


"XP" wrote:

Thanks for posting, using your suggestion no longer generates an error, but
the script fails to execute. I added a message box to first line in the
script file and it never fires.

Any other ideas?

"Vergel Adriano" wrote:

Hi,

This worked for me. try it this way

Shell "cscript MyPath\MyScript.vbs"



--
Hope that helps.

Vergel Adriano


"XP" wrote:

Using Office 2003 and Windows XP;

I am using the following code line to run a VBScript file:

Shell "MyPath\MyScript.vbs"

But, I get error: Invalid procedure call or argument

Any idea how I can get this to run using Shell?

The path and file are correct since I can run it using the hyperlink method,
but this produces an undesired unsupressable warning.

Thanks in advance.

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to copy 2007 excel file formula results into a 2003 Excel file Nuria Alba de Luz Excel Discussion (Misc queries) 2 July 10th 09 01:48 PM
double click excel file on the desktop excel opens but not file? JPT4266 Excel Discussion (Misc queries) 3 May 7th 09 04:24 PM
Excel 2003: doubleclick on file opens Excel window, not file. Silvy Excel Discussion (Misc queries) 2 June 29th 06 12:15 PM
ExtenXLS loads data into Excel 2002 file but damages the Excel file. [email protected] Excel Programming 1 April 28th 06 09:37 PM
opening an excel file opens a duplicate file of the same file skm Excel Discussion (Misc queries) 1 December 7th 05 05:52 PM


All times are GMT +1. The time now is 09:14 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"