Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Good day, i have a form and have disabled the "X" close button with the
code below. Since i have done that, my cancel button does not work ? When i click on it i get the following error message " Run time error '91'" "Object variable or with block variable not set". Could somebody please help, i am not sure what i have done wrong. '--------------- Close Button ---------------------------- Private Sub userform_QueryClose(Cancel As Integer, closeMode As Integer) If closeMode = vbFormControlMenu Then MsgBox "Please click on the cancel button to close the document", 0, "ZA-T-M-22" Cancel = True End If End Sub '--------------- Cancel Button ------------------------------------------------ Private Sub CmdCancel_Click() Application.DisplayAlerts = False Unload Me Application.Quit End Sub Tempy *** Sent via Developersdex http://www.developersdex.com *** |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
VBA Error Message "Compile Error...." | Excel Discussion (Misc queries) | |||
Excel XP error message Run Time Error 91 | Excel Programming | |||
changing the message in an error message | Excel Worksheet Functions | |||
How do I get rid of "Compile error in hidden module" error message | Excel Discussion (Misc queries) | |||
VBA Error Message | Excel Programming |