Disable close button on all froms & MsgBoxes

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is there a way to disable/hide/something the close buttons in all userforms
and msgboxes in a workbook? If not can you individually disable/hide them in
userforms? MsgBoxes?
 
On user forms try...

Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
If CloseMode = vbFormControlMenu Then
Cancel = True
'Chg msg text to fit your needs...
MsgBox "Please use the ''OK'' Button.", vbInformation
End If
End Sub
 
Thank you...
Do you know if there is a way to globalize this so that I can put it in once
and it will work for all userforms?
 
Back
Top