Remove Userform Deactivate Button

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top