Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am runing XL97 in Win95.
I am trying to prevent a user from disabling a userform using Ctrl-Break. I know how to stop him from clicking on the X but he can still press Ctrl-Break and get out from the code.. I am using the code below to trap Ctrl-Break error 18 but it doesn't work and I can't figure out why. No matter what I do I don't seem to get it to go to the ErrorHandler while UserForm1 is showing. There isn't anything on that in MSKnowledgebase. Thanks for any help. 'This is in ThisWorkbook Private Sub Workbook_Open() Call On_Open End Sub 'This is in Module1 Private Sub On_Open() On Error GoTo ErrorHandler Application.EnableCancelKey = xlErrorHandler UserForm1.Show ErrorHandler: If Err.Number = 18 Then UserForm1.Hide MsgBox "pressed break" End If End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Calculate working days but change working week | Excel Discussion (Misc queries) | |||
Making weekend days working days - the system cuts the working tim | Excel Discussion (Misc queries) | |||
one userform to another | Excel Discussion (Misc queries) | |||
Problem w/.EnableCancelKey = xlErrorHandler | Excel Programming | |||
Adding sales from a non working day to the previous working day | Excel Programming |