DISABLE CLOSE MSGBOX ON CLICK "X"

  • Thread starter Thread starter sal21
  • Start date Start date
sal21 said:
How to disable the close option with "X" in a msgbox?

the following works for a userform... not sure if it would work for a
msgbox: -

Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
If CloseMode = vbFormControlMenu Then Cancel = True
End Sub

hth,

tim
 

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