Add the macro below to the userform code module:
Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
If CloseMode = vbFormControlMenu Then
Cancel = True
MsgBox "You can't close the dialog like this!"
End If
End Sub
Here is where I got that code:
http://www.erlandsendata.no/english/...gspreventclose
Hope this helps,
Hutch
"Panagiotis Marantos" wrote:
Hello
just a quick question about userforms.
i want to disable the close button on the top right
how can i do that???