Results 1 to 5 of 5
  1. #1
    2 Star Lounger
    Join Date
    Jun 2002
    Posts
    122
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Remove Close Button (VB/Word/11(2003))

    Hi there,

    I'm wondering if it's possible to remove the close button from a VB form?

    Thanks in anticipation <img src=/S/wink.gif border=0 alt=wink width=15 height=15>

    Violet

  2. #2
    4 Star Lounger
    Join Date
    Dec 2003
    Location
    Zoetermeer, Zuid-Holland, Netherlands
    Posts
    559
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Remove Close Button (VB/Word/11(2003))

    Don't know how to do that, but you can prevent closing a form that way with this code:

    Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
    Cancel = (CloseMode = vbFormControlMenu)
    End Sub

  3. #3
    2 Star Lounger
    Join Date
    Jun 2002
    Posts
    122
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Remove Close Button (VB/Word/11(2003))

    That's good enough for me, thanks!

    V

  4. #4
    Platinum Lounger
    Join Date
    Nov 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    5,016
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Remove Close Button (VB/Word/11(2003))

    Alternatively, if you want the X both greyed out and disabled, you can use the API code detailed in the article Disabling the Close button.

    Alan

  5. #5
    4 Star Lounger
    Join Date
    Dec 2003
    Location
    Zoetermeer, Zuid-Holland, Netherlands
    Posts
    559
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Remove Close Button (VB/Word/11(2003))

    <img src=/S/thankyou.gif border=0 alt=thankyou width=40 height=15>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •