Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Shell Command Fails (sometimes)
I have been using the shell command often this way:
Shell Environ("comspec") & " /c " & ProgramFile & " <" & InFile & " " & OutFile, vbNormalFocus Sometimes it works and sometimes it does not (within the same directory, the path is OK.) It does not seem to be reading the input file of the executable. any ideas? Thanks Dan |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Shell Command Fails (sometimes)
Is it failing when the filename or its path contains blank spaces in them?
Try this... Shell Environ("comspec") & " /c """ & ProgramFile & _ """ <""" & InFile & _ """ """ & OutFile & """", vbNormalFocus Rick "Daniel" wrote in message ... I have been using the shell command often this way: Shell Environ("comspec") & " /c " & ProgramFile & " <" & InFile & " " & OutFile, vbNormalFocus Sometimes it works and sometimes it does not (within the same directory, the path is OK.) It does not seem to be reading the input file of the executable. any ideas? Thanks Dan |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Shell Command Fails (sometimes)
Thx Rick, but it still does the same
any other ideas? "Rick Rothstein (MVP - VB)" wrote: Is it failing when the filename or its path contains blank spaces in them? Try this... Shell Environ("comspec") & " /c """ & ProgramFile & _ """ <""" & InFile & _ """ """ & OutFile & """", vbNormalFocus Rick "Daniel" wrote in message ... I have been using the shell command often this way: Shell Environ("comspec") & " /c " & ProgramFile & " <" & InFile & " " & OutFile, vbNormalFocus Sometimes it works and sometimes it does not (within the same directory, the path is OK.) It does not seem to be reading the input file of the executable. any ideas? Thanks Dan |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Shell Command Fails (sometimes)
When you say it doesn't work... what does that mean? When it doesn't work,
do you get any kind of indication that it didn't work? Do you get an error (if so, what is the error message)? Does something happen, but not what you expect? Does nothing happen? Oh, I have to ask... you are use paths with your filenames, right? Rick "Daniel" wrote in message ... Thx Rick, but it still does the same any other ideas? "Rick Rothstein (MVP - VB)" wrote: Is it failing when the filename or its path contains blank spaces in them? Try this... Shell Environ("comspec") & " /c """ & ProgramFile & _ """ <""" & InFile & _ """ """ & OutFile & """", vbNormalFocus Rick "Daniel" wrote in message ... I have been using the shell command often this way: Shell Environ("comspec") & " /c " & ProgramFile & " <" & InFile & " " & OutFile, vbNormalFocus Sometimes it works and sometimes it does not (within the same directory, the path is OK.) It does not seem to be reading the input file of the executable. any ideas? Thanks Dan |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Shell Command Fails (sometimes)
Q1)When you say it doesn't work... what does that mean?
A1) The desired results does not happen, the exe is not executed Q2) When it doesn't work, do you get any kind of indication that it didn't work? A2) yes, the dos screen flashes (open/close) however the exe is not executed, no error message to work with, no error message in the output file (when the exe runs it generates an out file), this means the exe did not kick in, why, that is what I am trying to find out and the problem is that this is intermittent, sometimes it works and sometimes it does not, sorry I am really disconcerted with this any other ideas "Rick Rothstein (MVP - VB)" wrote: When you say it doesn't work... what does that mean? When it doesn't work, do you get any kind of indication that it didn't work? Do you get an error (if so, what is the error message)? Does something happen, but not what you expect? Does nothing happen? Oh, I have to ask... you are use paths with your filenames, right? Rick "Daniel" wrote in message ... Thx Rick, but it still does the same any other ideas? "Rick Rothstein (MVP - VB)" wrote: Is it failing when the filename or its path contains blank spaces in them? Try this... Shell Environ("comspec") & " /c """ & ProgramFile & _ """ <""" & InFile & _ """ """ & OutFile & """", vbNormalFocus Rick "Daniel" wrote in message ... I have been using the shell command often this way: Shell Environ("comspec") & " /c " & ProgramFile & " <" & InFile & " " & OutFile, vbNormalFocus Sometimes it works and sometimes it does not (within the same directory, the path is OK.) It does not seem to be reading the input file of the executable. any ideas? Thanks Dan |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Wscript.Shell Run vbs Fails? | Excel Programming | |||
Shell Command | Excel Programming | |||
Shell command | Excel Programming | |||
xp shell command using vba | Excel Programming | |||
SHELL command | Excel Programming |