Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Remove Close Button From Excel Form 2

Status
Not open for further replies.

DYM03

Technical User
Mar 6, 2003
28
US
I cannot find the property setting, if there is one, to remove the close button from the User Form in Excel. I have been looking for the code to do this but I can't find it. Any help or suggesstions would be appreciated. I also tried importing a form I created in Access but that is not working for me to well either.
 
You can disable the button with th e following code :
Code:
Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
    If CloseMode = 0 Then Cancel = True
End Sub
To actually remove the button (x) would require some API calls.

A.C.
 
Thanks to both of you. That worked great.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top