Hi,
I'm trying to put a class module in an Excel 2003 vba project to apply to all of my userforms, that disables the Query close button - it should be simply enough (I've got the disabling code sorted fine) - I'm just struggling on the Class module side of things:
I'm trying to put a class module in an Excel 2003 vba project to apply to all of my userforms, that disables the Query close button - it should be simply enough (I've got the disabling code sorted fine) - I'm just struggling on the Class module side of things:
Rich (BB code):
Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
If CloseMode = vbFormControlMenu Then
MsgBox "You cannot use this button to quit the application" & vbCrLf & _
"In order to quit, you must use the Exit button on the Main Menu screen", vbExclamation, "Invalid Action"
Cancel = True
End If
End Sub