
Disable close button on a Userform
Jason,
You don't need to hide it as there is a QueryClose event that you can
monitor. For instance
Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
If Not fValid Then
Cancel = True
End If
End Sub
if fValid is set to False, the close button has no effect. You could throw
up a message, or just ignore that action. This also disables the close on
the form control menu.
--
HTH
-------
Bob Phillips
... looking out across Poole Harbour to the Purbecks
Quote:
> Is it possible to disable or hide the close button (x at
> top right of the window) on a Userform, so the Userform
> can only be closed by clicking an okay button