shambalad
asked on
Shell command only works in Debug mode
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.
TaskList-Demo.accdb
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.
TaskList-Demo.accdb
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you very much.
Todd