Prevent DialogBox closing

  • Thread starter Thread starter Patrick Simonds
  • Start date Start date
P

Patrick Simonds

Is there any way to prevent someone from closing a dialogbox by clicking the
X in the upper right corner?
 
Do you think dialog box(for example message box) or form?
For form, I know how solvate your problem, but I'am afraid for dialog
box it isn't possible. Contact me on e-mail.
Dejv
 
You might have to use a Userform to mimic the functionality of the dialog
box, then use this from J-Walk:

Private Sub UserForm_QueryClose _
(Cancel As Integer, CloseMode As Integer)
' Prevents use of the Close button
If CloseMode = vbFormControlMenu Then
MsgBox "Clicking the Close button does not work."
Cancel = True
End If
End Sub
 
Having the answer here in the forum, where the question originated, might
be preferable.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top