P Patrick C. Simonds Nov 28, 2007 #1 Is there any way to prevent a user from closing a dialog box by clicking on the X in the upper right corner?
Is there any way to prevent a user from closing a dialog box by clicking on the X in the upper right corner?
J john Nov 28, 2007 #2 try this but make sure you have another method to dismiss the form: Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer) If CloseMode <> 1 Then Cancel = 1 msg = MsgBox("Please Use Cancel Button", 16, "Warning") End If End Sub
try this but make sure you have another method to dismiss the form: Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer) If CloseMode <> 1 Then Cancel = 1 msg = MsgBox("Please Use Cancel Button", 16, "Warning") End If End Sub