Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Run .vbs from a Excel macro?
Hi guys!
I need to run a .vbs scrpit from inside a excell macro. (the script opens phostoshop, does several actions, makes some files... and closes..) How can i do this?? Thnks a lot!! SpeeD |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Run .vbs from a Excel macro?
Use the shell command. See excel vba help for details.
-- Regards, Tom Ogilvy "SpeeD" wrote in message ... Hi guys! I need to run a .vbs scrpit from inside a excell macro. (the script opens phostoshop, does several actions, makes some files... and closes..) How can i do this?? Thnks a lot!! SpeeD |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Run .vbs from a Excel macro?
Thanks Tom!
I´ll do that! SpeeD72 "Tom Ogilvy" wrote: Use the shell command. See excel vba help for details. -- Regards, Tom Ogilvy "SpeeD" wrote in message ... Hi guys! I need to run a .vbs scrpit from inside a excell macro. (the script opens phostoshop, does several actions, makes some files... and closes..) How can i do this?? Thnks a lot!! SpeeD |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Run .vbs from a Excel macro?
hi again!
The command works fine with an EXE, but give an "invalid preocedure" with my test.vbs file. Is there a way to go round this problem? Thanks SpeeD72 "Tom Ogilvy" wrote: Use the shell command. See excel vba help for details. -- Regards, Tom Ogilvy "SpeeD" wrote in message ... Hi guys! I need to run a .vbs scrpit from inside a excell macro. (the script opens phostoshop, does several actions, makes some files... and closes..) How can i do this?? Thnks a lot!! SpeeD |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Run .vbs from a Excel macro?
Post your code.
-- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "SpeeD" wrote in message ... hi again! The command works fine with an EXE, but give an "invalid preocedure" with my test.vbs file. Is there a way to go round this problem? Thanks SpeeD72 "Tom Ogilvy" wrote: Use the shell command. See excel vba help for details. -- Regards, Tom Ogilvy "SpeeD" wrote in message ... Hi guys! I need to run a .vbs scrpit from inside a excell macro. (the script opens phostoshop, does several actions, makes some files... and closes..) How can i do this?? Thnks a lot!! SpeeD |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Run .vbs from a Excel macro?
The executable for running scripts is either Wscript.exe or Cscript.exe,
both located in the system32 folder. Something like: Sub RunAscript() Dim RetVal RetVal = Shell("C:\Windows\System32\WScript.exe C:\Test\myScript.vbs", 0) End Sub would run the script "C:\Test\myScript.vbs" using Shell. I think I'd create an instance of the Scripting Runtime in Excel and just incorporate the code from the script inside the VBA routine rather than launch a separate script. If you use Shell, you can't be sure that the script will have finished what it's supposed to do before the rest of your code runs. Steve "SpeeD" wrote in message ... hi again! The command works fine with an EXE, but give an "invalid preocedure" with my test.vbs file. Is there a way to go round this problem? Thanks SpeeD72 "Tom Ogilvy" wrote: Use the shell command. See excel vba help for details. -- Regards, Tom Ogilvy "SpeeD" wrote in message ... Hi guys! I need to run a .vbs scrpit from inside a excell macro. (the script opens phostoshop, does several actions, makes some files... and closes..) How can i do this?? Thnks a lot!! SpeeD |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort | Excel Worksheet Functions | |||
My excel macro recorder no longer shows up when recording macro | Excel Discussion (Misc queries) | |||
My excel macro recorder no longer shows up when recording macro | Excel Discussion (Misc queries) | |||
translate lotus 1-2-3 macro into excel macro using excel 2000 | Excel Programming |