Easier is to just manage closing of the form with the queryclose event:
Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
'Prevent user from closing with the Close box in the title bar.
If CloseMode < 1 Then Cancel = 1
UserForm1.Caption = "Use the close button"
End Sub
If you still want to remove the X button, then you need to use the Windows
API.
See Stephen Bullen's site formfun.zip
http://www.bsmltd.ie
in the links on the left, go to the excel page
--
Regards,
Tom Ogilvy
"Martin" wrote in message
...
I'm trying to remove the deactivate button from a Userform's button bar...
is
this possible and how would I go about it?
Would be greatful for any help with this.
Thanks
Martin