View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Remove Close Icon ?

thx Jon,

I ended up finding it the hard way but you are dead right -
it does exactly what I want and I can now prohibit the
close from the close button !
-----Original Message-----
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


.