View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Nigel[_2_] Nigel[_2_] is offline
external usenet poster
 
Posts: 735
Default Userform Question

There is no form property to disable this option. You can only do this via
an API call. Alternatively you can intercept the user pressing the button
and choose to ignore it. e.g.

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



--

Regards,
Nigel




"Please Help" wrote in message
...
How do I disable the close button (X button) at the top-right corner of a
user form? I looked for it in the form properties, and I didn't find it.

Thanks.