I've written several scripts that act as production environment monitors. These scripts fire off multiple times a day, and at the end write information to spreadsheets. Other scripts, at the end of the day, email these spreadsheets to whoever needs them. This is all working...except:
After one run of the email script, the attachments become locked and can not be written to by the monitor scripts. It must be something simple I'm missing but can't for the life of me find the solution. The email code is as follows for reference but is pretty straight forward. Thanks for any help that can be extended.
Thanks very much for the reply and the suggestion.
It turns out that the monitoring scripts, which run in excess of 100 times a day, don't close QTP after each iteration. So the files are locked because of the QTP process, not because of an Excel process. In essence the script itself gets closed but not the application. Adding a bit of code to the vbs file killing QTP after the run seems to have done the trick.