Jump to content

Setting behaviour upon error - Answered

Recommended Posts

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 by shornw

[font='Comic Sans MS']Eagles may soar high but weasels dont get sucked into jet engines[/font]

Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...