Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I have a macro that uses psexec to launch presentations on remote machines, in the macro I capture the workstation name and the file name from cells and pass it to the psexec command line, only problem is the command ignores the first variable. WKSTN = "\\" & Range("N8").Text TargetFile = Range("B7").Value Shell ("c:\PRES\psexec & WKSTN -e -i -d ""c:\program files\microsoft office\office11\pptview.exe"" /S c:\pres\" & TargetFile) If I amend to Shell ("c:\PRES\psexec \\WorkstationName -e -i -d ""c:\program files\microsoft office\office11\pptview.exe"" /S c:\pres\" & TargetFile) It works fine Using & WKSTN the variable does not get passed to the command line and psexec tries to launch & WKSTN Any help appreciated Regards and thanks Paul |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to run a shell command via VBA? | Excel Programming | |||
Shell command ignores parameters | Excel Programming | |||
Shell command ignores parameters | Excel Programming | |||
Shell Command | Excel Programming | |||
xp shell command using vba | Excel Programming |