ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   remove close button (https://www.excelbanter.com/excel-programming/274749-re-remove-close-button.html)

Ron de Bruin

remove close button
 
Try this event in the Userform Josh

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."
Cancel = True
End If
End Sub


--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2002 SP-2)
www.rondebruin.nl



"Josh Ashcraft" wrote in message
...
how do i remove the close button (X) from the top of a
userform?

Thanks,
Josh





All times are GMT +1. The time now is 07:35 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com