This is driving me a little stir crazy.
I have written a function which executes a shell command to create a tasklist file. It appears the only way that it will work is if I actually step through the command in debug mode. Not sure what I'm doing wrong here.
I've attached a small app to illustrate the problem.
When you open the app, the form has a 'checkbox' labelled "Step through the Shell command". If you click the 'Load the task list' command button, while the checkbox is checked, the function will stop just prior to where the Shell command is executed. If you press CTRL+8 twice to actually step through the Shell command, the text file is created.
Now try clicking the 'Load the task list' command button, while the checkbox is not checked, an error is generated because the file isn't created.
Can anyone explain to me what is happening here and why?
- It's really late and I'm going to try to get some sleep for a few hours. I'll check on this when I get up.