It seems that your workbook is big enough that there is a time delay between opening and running code, leaving an opportunity for the user to hit esc in the meantime. Perhaps instead of calling WebPage on the workbook opening, you could have the file be simply a 'landing page' with instructions and a single button to click. This gives the user control over executing the macro, but also gives you time to load your disabling of the escape key before the macro is run.
Also, if you have confidence that your error handling will return all functionality to normal you could use this instead:
Application.InterActive = False
This would prevent any key instructions being entered, including esc & command break.
Asked in February 2016Viewed 3,897 timesVoted 14Answered 1 times