I am tinkering with a hobby project. I have it all planned out with only one item that I am not sure how to do.
I want VBA to open an executable. After the process ends (regardless whether it finished running, the end user closed or if the program crashed), the running time is recorded to an external file.
I know how to make VBA run a program. I know how to make VBA write data to a text based file. It's detecting the program end that I'm having trouble with.
I don't care what method is used to determine the program end. (It doesn't need to be Excel/VBA that determines that the exe has ended.) As long as the running time is written and the means is not resource intensive (e.g. I wouldn't want to continually loop VBA checking the process existence)
I have recently read about WaitForSingleObject but I'm not sure if this is what I should be looking into?
Re accuracy level - The running time doesn't have to be millisecond accurate. I will be recording running time in seconds. Up to 2 seconds variance is acceptable.
Re environment - Excel 2010 32 bit installed in Windows XP 32 bit
Bookmarks