Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Greetings, Is it possible to launch a script from vba?
|
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Use shell function
Shell(pathname[,windowstyle]) "Office_Novice" wrote: Greetings, Is it possible to launch a script from vba? |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Tryied that it threw a Run Time Error: Invaild procedure
"Joel" wrote: Use shell function Shell(pathname[,windowstyle]) "Office_Novice" wrote: Greetings, Is it possible to launch a script from vba? |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
How do you normally run the script?
You provbably have to run the VB and pass the VB apllication the script in a command line option. shell("c:\program files\Vb\vb.exe c:\user\myscript") something like the line above where vb.exe is the application. You need tospecify in the command line the option for a script input. "Office_Novice" wrote: Tryied that it threw a Run Time Error: Invaild procedure "Joel" wrote: Use shell function Shell(pathname[,windowstyle]) "Office_Novice" wrote: Greetings, Is it possible to launch a script from vba? |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Any idea how to pass the script's path from VBA to the command line?
"Joel" wrote: How do you normally run the script? You provbably have to run the VB and pass the VB apllication the script in a command line option. shell("c:\program files\Vb\vb.exe c:\user\myscript") something like the line above where vb.exe is the application. You need tospecify in the command line the option for a script input. "Office_Novice" wrote: Tryied that it threw a Run Time Error: Invaild procedure "Joel" wrote: Use shell function Shell(pathname[,windowstyle]) "Office_Novice" wrote: Greetings, Is it possible to launch a script from vba? |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
A VBA main subroutine (SUB) in VBA cannot have any parameters. The main VBA
sub can call other subroutine and functions passing parameters. The path must come use other methods then passing parameters 1) You may want to put the script name on the worksheet 2) You can browse for the script using getfilenameopen method 3) You can hard code the filename in the VBA code. 4) You can search for a file name using the DIR() method using a wildcard Folder = "c:\temp\" FName = dir(Folder & "*.txt") do while FName < "" 'enter you code here FName = dir() loop "Office_Novice" wrote: Any idea how to pass the script's path from VBA to the command line? "Joel" wrote: How do you normally run the script? You provbably have to run the VB and pass the VB apllication the script in a command line option. shell("c:\program files\Vb\vb.exe c:\user\myscript") something like the line above where vb.exe is the application. You need tospecify in the command line the option for a script input. "Office_Novice" wrote: Tryied that it threw a Run Time Error: Invaild procedure "Joel" wrote: Use shell function Shell(pathname[,windowstyle]) "Office_Novice" wrote: Greetings, Is it possible to launch a script from vba? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
borders in VBScript | Excel Programming | |||
Please help with ADO and VBScript! | Excel Programming | |||
vbscript question... | Excel Programming | |||
VBscript | Excel Programming | |||
VBscript | Excel Programming |