Hi all,
My final goal is to automate the process below. I prefer to explain my final goal since people could see potential issues that I have not foreseen in a simpler problem. But to keep things shorter, I will write farther below this simpler problem as an example of what I don't know how to do.
1-open a command shell (cmd.exe)
2-from the shell, launch a program ProgTest.exe calling a save file SaveTest.txt using the following syntax C:\...\ProgTest.exe C:\...\SaveTest.txt The result of this program is stored in memory as a set of lines with a format like:
id1;2;;;d;3;
id2;;t;;r;;
id3;A;;5;;8;
etc.
3-paste what is stored in memory in a spreadsheet (A1 receives id1;2;;;d;3; /A2 receives id2;;t;;r;; etc.)
4-then use the Excel tool "Text to columns", using Semicolon as a delimiter.
5...
If I could get the code to do what is below, I think that I should be able to take care of the remaining.
Having in A1 the following string "calc.exe", click on a button to launch the following macro:
1- copy the string from A1 ("calc.exe")
2- open the Command shell (cmd.exe)
3- paste the memory content
4- validate (Enter) the command and launch Calculator
5- go to A2
6- paste the memory content in A2 (still "calc.exe" in this case, but it should be the result from a program). Usually I know this part but I am not sure that this won't require some extra care since we left Excel to the command shell at some point.
I hope that this is clear enough,
Thank you for any help,
Regards.
Bookmarks