+ Reply to Thread
Results 1 to 6 of 6

Hide or disable the 'Close' button

  1. #1
    Registered User
    Join Date
    03-31-2006
    MS-Off Ver
    Excel 2003
    Posts
    76

    Hide or disable the 'Close' button

    Is it possible to hide or disable the Excel 'Close' button (x) in the right upper corner?
    (VBA, API or alike).

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    Why would you want to do that?
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Registered User
    Join Date
    03-31-2006
    MS-Off Ver
    Excel 2003
    Posts
    76
    It's just idle curiosity. I know other ways to do this.

  4. #4
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    I woulod just cancel in the before close event, you can add an If statement to check first

  5. #5
    Registered User
    Join Date
    03-31-2006
    MS-Off Ver
    Excel 2003
    Posts
    76
    Thank you, royUK!
    I know this. But I need exactly what I wrote.

  6. #6
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    Hello 5631,

    To hide the close "X" on a UserForm requires a macro that makes some API calls to modify the window's title bar. Here is the macro code. Place a call to the macro in the UserForm_Activate event procedure.
    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1