Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Does Application.INTERACTIVE have a purpose?

Status
Not open for further replies.

tmktech

MIS
Oct 3, 2002
78
US
Hey everyone.

For quite some time now - based on the described features in VBA help - I have disabled / enabled Application.Interactive at the beginning / end respectively of VBA routines to prevent the user from interrupting. I have since included

Application.EnableCancelKey = xlErrorHandler

with checks for err.number = 18 to keep the user from using esc to interrupt.

I occasionally get 1004 errors when trying to set .interactive to true during error processing, and before I go to lengths to deal with it, IS THERE ANY NEED FOR INTERACTIVE= FALSE???

Thanks in advance!

TMKTECH
 
I need to clarify. I added the cancel key code because setting .interactive=false DIDN't SEEM TO HAVE ANY EFFECT ON KEEPING THE USER FROM INTERRUPTING MY CODE (although I know it precludes interacting with the sheets themselves).

TMKTECH
 
That's exactly what interactive does - stops users interfering with sheets etc whilst code is running. Depending on what code is running, sometimes, you can actually use excel at the same time. This is for those instances so that users cannot change anything whilst code is running - won't stop them pressing the esc kep tho ;-)

I would question the usefulness of this as app.screenupdating seems to do the job just fine as well and I've never had a 1004 error with screenupdating Rgds
Geoff
"Some cause happiness wherever they go; others whenever they go."
-Oscar Wilde
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top