Hello everyone,
I would like VBA to run another program's script file (Gretl) through the Command Prompt.
In order to manually run Gretl's script through the Command Line I follow these 2 steps:
(1): cd C:\Program Files\gretl (change directory to the file that holds gretlcli.exe)
(2): > gretlcli -b "C:\Users\ndw\Desktop\PLS.inp" (this command runs the Gretl scriptfile I created, PLS.inp)
However, I am at a loss on how to let VBA run this command for me. I looked for some information on how to do this in related topics, but I did not succeed in making it work on my own.
I tried to use the 'Shell' command (i.e. Shell ("CMD.exe /k CD C:\Program Files\gretl")). While this manages to replicate the first step of my manual proces, namely setting the directory to the Gretl folder, I cannot seem to be able to tell VBA to execute the second part of the command (i.e. running the actual Gretl script).
Thanks in advance.
Bookmarks