Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
EnableCancelKey traps ctrlBreak once, but not twice
Hi - I'm using the following statements (within a procedure) to handle an
interrupt request by the user. It functions properly when the user interrupts the procedure with the ESCAPE key, but it only functions properly once if the ctrlBREAK is pressed. The statements trap and test for Runtime Error = 18 (the errror code for code interruption). Err=18 both times the ctrlBreak is pressedand the first time the error is handled properly, but the second time the Excel and the VB environment (not my error handling statements) stop execution with a "Runtime Error '18'" dialog with [End] [Debug] buttons. On Error GoTo userInterrupt Application.EnableCancelKey=xlErrorHandler ' do stuff here.... userInterrupt: if err=18 then ' handleerror resume next else resume next end if end sub -- Thanks, Jay |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
EnableCancelKey with On Error Resume Next | Excel Programming | |||
Problem w/.EnableCancelKey = xlErrorHandler | Excel Programming |