+ Reply to Thread
Results 1 to 6 of 6

User Form - Exception Occurred

  1. #1
    Registered User
    Join Date
    09-20-2011
    Location
    UK
    MS-Off Ver
    Excel 2007
    Posts
    43

    User Form - Exception Occurred

    I have a user form with 48 checkboxes on it. To my knowledge I've not made any changes to it and it was working ok yesterday but now when I click some of the checkboxes it causes an 'Exception Occurred' error to pop up. To try and troubleshoot it I created a copy of the workbook and deleted all the code from the user form but still when those checkboxes are clicked the error occurs. If I delete the offending check box and put a new one in it's place it's OK.

    Any idea whats happening here? I could just delete all the offending check boxes and put replacements in there but I'm worried the problem might surface again.
    Last edited by Riggers; 09-20-2011 at 03:59 AM.

  2. #2
    Registered User
    Join Date
    09-20-2011
    Location
    UK
    MS-Off Ver
    Excel 2007
    Posts
    43

    Re: User Form - Exception Occurred

    Solved it. Checked boxes were linked to named cell and the sheet / cell was protected. Removing protection from those cells solved the problem. Not a very useful error message form Mr. Excel lol.

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

    Re: User Form - Exception Occurred

    Try Protection with UserInterface. Is this actually a UserForm or a worksheet?
    Last edited by royUK; 09-20-2011 at 12:43 PM.
    Hope that helps.

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

    Free DataBaseForm example

  4. #4
    Registered User
    Join Date
    09-20-2011
    Location
    UK
    MS-Off Ver
    Excel 2007
    Posts
    43

    Re: User Form - Exception Occurred

    Quote Originally Posted by royUK View Post
    Tru Protection with UserInterface. Is this actually a UserForm or a worksheet?
    I'm a novice so don't understand what you mean by Tru Protection with UserInterface.

    In Excel Visual Basic Editor I've created a user form with checkboxes linked to a worksheet via the ControlSource property of the checkbox. I display the userform using a macro i.e. userform.show. If you try and click the check boxes when the worksheet is protected you get an exception error.

    It took me a while to work out what the problem was due to the inadequacy of the error message description.

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

    Re: User Form - Exception Occurred

    Do you need to use ControlSource? If you do that means changes in the UserForm will change the sheet & vice versa.

    Protecting with UserInterface allows macros to work on protected sheets, but iI don't think it would help in this case

  6. #6
    Registered User
    Join Date
    09-20-2011
    Location
    UK
    MS-Off Ver
    Excel 2007
    Posts
    43

    Re: User Form - Exception Occurred

    Quote Originally Posted by royUK View Post
    Do you need to use ControlSource? If you do that means changes in the UserForm will change the sheet & vice versa.

    Protecting with UserInterface allows macros to work on protected sheets, but iI don't think it would help in this case
    The user form allows the user to change configuration settings for the functionality in the workbook. I want these to persist across sessions of the workbook so I keep them in a hidden worksheet, hence the link to the cell using control source. I've done some googling of UserInterfaceOnly=True and it will be really useful, and indeed it does work with this user form.

+ 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