shornw Posted May 30, 2012 Share Posted May 30, 2012 (edited) This may be really simple or not possible, I really don't know. I have a script which opens several Excel workbooks and does various things. To prevent the operator clicking in the sheet, which causes the script to fail, I open the sheets using the 0 (hidden) option. Occasionally I get an unexpected error (I know - they shouldn't happen, but occasionally they do..! please note: this isn't what I'm interested in resolving at the moment, the script has error handling for appropriate parts) which leaves the workbooks open. My question is, is it possible to have an over-arching error control, so that in the event of an 'unexpected' error occurring, then any open workbooks would be closed - kind of like when HotKeys are set, so that whatever the script is doing a function is called. Is this possible, am I talking nonsense or is this such a simple thing to implement that I should hang my head in shame As always, thanks for any ideas Edited May 30, 2012 by shornw [font='Comic Sans MS']Eagles may soar high but weasels dont get sucked into jet engines[/font] Link to comment Share on other sites More sharing options...
JohnOne Posted May 30, 2012 Share Posted May 30, 2012 http://autoitscript.com/forum/topic/126714-onautoiterrorregister-handle-autoit-critical-errors/Perhaps. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
shornw Posted May 30, 2012 Author Share Posted May 30, 2012 Excellent and thank you. This looks to be exactly what I wanted [font='Comic Sans MS']Eagles may soar high but weasels dont get sucked into jet engines[/font] Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now