rakeshm
11-26-2015, 06:17 AM
Hello All,
I have a problem that I couldn't run a Python file from Command Prompt using VBA.
I tried following statements:
When I tried the below statement, An Error, 'Runtime Error '5': Invalid Procedure Call or Argument is being displayed'.
shellvar = Shell("C:\Program Files (x86)\Common Files\dSPACE\Python25\python.exe " & "C:\Users\rmothuk1\Desktop\My Navigator.py", vbNormalFocus)
When I tried the below statements, there was no Error but I could not see the Output (GUI should be Opened)
Call Shell("runas " & "C:\Program Files (x86)\Common Files\dSPACE\Python25\python.exe " & "C:\Users\rmothuk1\Desktop\My Navigator.py", vbNormalFocus)
shellvar = Shell("runas /user:administrator " & "C:\Program Files (x86)\Common Files\dSPACE\Python25\python.exe " & "C:\Users\rmothuk1\Desktop\My Navigator.py", vbNormalFocus)
Kindly help me in this regard.
Thanks in advance,
Rakesh
I have a problem that I couldn't run a Python file from Command Prompt using VBA.
I tried following statements:
When I tried the below statement, An Error, 'Runtime Error '5': Invalid Procedure Call or Argument is being displayed'.
shellvar = Shell("C:\Program Files (x86)\Common Files\dSPACE\Python25\python.exe " & "C:\Users\rmothuk1\Desktop\My Navigator.py", vbNormalFocus)
When I tried the below statements, there was no Error but I could not see the Output (GUI should be Opened)
Call Shell("runas " & "C:\Program Files (x86)\Common Files\dSPACE\Python25\python.exe " & "C:\Users\rmothuk1\Desktop\My Navigator.py", vbNormalFocus)
shellvar = Shell("runas /user:administrator " & "C:\Program Files (x86)\Common Files\dSPACE\Python25\python.exe " & "C:\Users\rmothuk1\Desktop\My Navigator.py", vbNormalFocus)
Kindly help me in this regard.
Thanks in advance,
Rakesh