Monday, April 12, 2010

Stop a user from closing a UserForm via the X:

Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)

If CloseMode = 0 Then

Cancel = True

MsgBox "Please use the Cancel button", vbCritical

End If

End Sub

No comments: