+ Reply to Thread
Results 1 to 4 of 4

How to prevent the closure of a UserForm

  1. #1
    Registered User
    Join Date
    09-21-2010
    Location
    Rome, Italy
    MS-Off Ver
    Excel 2003
    Posts
    36

    How to prevent the closure of a UserForm

    Hi all,
    I'm preparing a sheet which has to be used by not very skilled users.
    For this reason, I prepared dedicated UserForms (see example attached) to input data but I would not permit the user to "close" the forms simply by clicking on the red-upper-right-corner "X", without following correctly my procedure.

    I immagine this is possible by an appropriate code in loading the form.

    Can anyone help?
    As usual I do appreciate in advance your promt and professional assistance.
    Attached Images Attached Images
    Last edited by Romoluzzi; 02-14-2011 at 01:22 PM.

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: How to prevent the closure of a UserForm

    Try this

    Please Login or Register  to view this content.
    Hope that helps.

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

    Free DataBaseForm example

  3. #3
    Forum Expert Colin Legg's Avatar
    Join Date
    03-30-2008
    Location
    UK
    MS-Off Ver
    365
    Posts
    1,256

    Re: How to prevent the closure of a UserForm

    You can prevent it closing via the X button by adding the following event handler to the userform's code module:
    Please Login or Register  to view this content.

    [edit]RoyUK already gave the same answer but I cannot soft delete this post.[/edit]
    Hope that helps,

    Colin

    RAD Excel Blog

  4. #4
    Registered User
    Join Date
    09-21-2010
    Location
    Rome, Italy
    MS-Off Ver
    Excel 2003
    Posts
    36

    Re: How to prevent the closure of a UserForm

    As expected, you are the BEST!
    Thank you so much RoyUK and Colin Legg

+ 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