User Form Suppress Close Control Object

  • User Form Suppress Close Control Object


    i would like to turn off (not show) the User Form Suppress Close Control Object (top right hand corner)...?


    ???


    thank you.

  • Re: User Form Suppress Close Control Object


    EDIT:
    Well, This thread shows exactly what mikerickson just posted. I found it at the top of this page, and was just about to post it.
    Thx, mike...
    http://www.ozgrid.com/forum/showthread.php?t=31400



    You can do the following in the Terminate event. It's kind of generic and can be broken with Ctrl+Brk. The only problem is, you may lose data in text boxes and other controls, but it may suit your needs.

    Code
    Private Sub UserForm_Terminate()
        UserForm1.Show
    End Sub

    "The more you know, the less you don't know."

  • Re: User Form Suppress Close Control Object


    Code
    Private Sub UserForm_QueryClose(Cancel As Integer, closemode As Integer)
    If MsgBox("OK to close?", vbOKCancel) = vbCancel Then Cancel = True
    
    
    End Sub

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!