aerodoc
10-28-2010, 09:00 AM
On some computers/companies, the shell command will not run.
I am using this code, but have used other approaches to call a windows command shell:
http://www.cpearson.com/excel/ShellAndWait.aspx
It stops here, which may give an better idea about why it won't run the command shell:
ProcHandle = OpenProcess(SYNCHRONIZE, False, TaskID)
If ProcHandle = 0 Then
ShellAndWait = ShellAndWaitResult.Failure
Exit Function
End If
My best guess is that this computer system/company has incorporated something that restricts Excel VBA from actually running the shell command. Perhaps this is set by IT or anti-virus, etc.? I suppose this might be a security measure/setting?
I am using this code, but have used other approaches to call a windows command shell:
http://www.cpearson.com/excel/ShellAndWait.aspx
It stops here, which may give an better idea about why it won't run the command shell:
ProcHandle = OpenProcess(SYNCHRONIZE, False, TaskID)
If ProcHandle = 0 Then
ShellAndWait = ShellAndWaitResult.Failure
Exit Function
End If
My best guess is that this computer system/company has incorporated something that restricts Excel VBA from actually running the shell command. Perhaps this is set by IT or anti-virus, etc.? I suppose this might be a security measure/setting?