View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Jon Peltier[_4_] Jon Peltier[_4_] is offline
external usenet poster
 
Posts: 90
Default Remove Close Icon ?

Malcolm -

You can use UserForm_QueryClose to see how the form was told to close:

Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
'' Prevents use of the Close button
If CloseMode = vbFormControlMenu Then
MsgBox "Clicking the Close button does not work.", vbInformation
Cancel = True
End If
End Sub

- Jon
-------
Jon Peltier, Microsoft Excel MVP
http://www.geocities.com/jonpeltier/Excel/index.html
_______

Malcolm wrote:
Hi All

I'd like to remove the close icon on the titel bar and
control the close myself. I can close everything OK but
cannot find a way to remove the X from the title bar.
I am including a button that pops up with an
'You are about to close this application Are You Sure ?'

I can do everything except remove the X

Any ideas please ?

Malcolm