Running batch file via Excel VBA
<p>I have a batch file which runs a Python script.</p>
<p>I can manually click to execute that batch file.</p>
<p>When I try to run it via Excel VBA the file does not execute.</p>
<p>The code in Batch file is something like this:</p>
<pre><code>%cd
file.py
</code></pre>
<p>The batch file &amp; the file I want to execute are in same directory.</p>
<p>Instead of %cd% in above code if I type in exact directory address then Excel VBA has no problem running the batch file. For example if my batch file looks something like this then there are no issues.</p>
<pre><code>c:
cd c:\folder
file.py
</code></pre>