Hello,
is it possible to hide or to disable the close-symbol ((X) upper right) on a userform? And if so, how you do it ??
Thanks in advange
Printable View
Hello,
is it possible to hide or to disable the close-symbol ((X) upper right) on a userform? And if so, how you do it ??
Thanks in advange
Hi
pls give some more information about the userfom!
is it in VB / Excel / Word ...... ?
Chris
excuse me,Quote:
Originally Posted by Chris67
the form is made in EXCEL.
Commandbuttons are on the userform and are used to simplify the work of other users.
I dont think you can get a handle on the Excel VBA userform object the same way you can in VB Form object to disable the X button.
You can cheat though by intercepting the X QueryClose command like below
put this code in a userform, and try pressing the X button !
VB Code:
Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer) If CloseMode = vbFormControlMenu Then Cancel = True End If End Sub
I just wrote this code for you to actually Disable the 'x' close button on a VBA userform. :D
Fair play Rob Dogg,
will be nicking that bit of code myself !!!
Didn't know you could do that with VBA userforms.
Me neither but I thought it was worth a try. Not having a controlbox or system menu I wouldnt think it would work but it did just as if it was there. The close menu item in the system menu is in the same place for all stardard windows. So I took a chance. :D