+ Reply to Thread
Results 1 to 3 of 3

Adding worksheet protection but allowing form controls, macros

  1. #1
    Forum Contributor
    Join Date
    04-14-2013
    Location
    Ky
    MS-Off Ver
    Excel 2013
    Posts
    344

    Adding worksheet protection but allowing form controls, macros

    I have a worksheet with lots of things going on... the end user needs access to the Name field, DOB field, all the scroll and form control option buttons in the 9-question sheet, and the macro-enabled reset button at the bottom. Formulas are sprinkled throughout the worksheet, in columns T through AC... option button links go to AA and AB.

    I would like to protect the entire sheet so none of the fields, except where indicated above, could be selected or edited... but when I protect the sheet, I get errors when trying to use you form controls, and the formulas do not respond. And finally, when protected, I get a debug error on the reset macro. Any help is much appreciated!
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    04-14-2013
    Location
    Ky
    MS-Off Ver
    Excel 2013
    Posts
    344

    Re: Adding worksheet protection but allowing form controls, macros

    Follow-up Post:

    As for the Reset Macro, I figured there may be VBA code that could first unlock (unprotect) the entire sheet, run the rest of my reset code, and then lastly re-lock (re-prootect the the sheet). But I need to get the error to stop... the form control scrolls and option buttons are another matter...

  3. #3
    Forum Contributor
    Join Date
    04-14-2013
    Location
    Ky
    MS-Off Ver
    Excel 2013
    Posts
    344

    Re: Adding worksheet protection but allowing form controls, macros

    I'm going to mark my thread solved...

    From my internet searches, it appears the cells which the option boxes and scroll bars are linked to have to be left unlocked. If anyone knows of a work around, let me know.

    And macro VBA code worked great:

    Sheet4.Unprotect Password:="hercules"
    ' code
    Sheet4.Protect Password:="ljaf"
    End Sub

    The nice thing about the reset macro, though, is it resets (clears and/or re-establishes) the cells and formulas that are unlocked!

    -HeyInKy

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Allowing worksheet to be updated and keep protection in place
    By The hammer 1956 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-13-2014, 05:28 PM
  2. Replies: 1
    Last Post: 10-02-2013, 09:05 PM
  3. Adding controls to user form
    By toocold in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-26-2009, 04:42 AM
  4. Adding controls to each page in a multipage form
    By michael fuller in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-13-2006, 05:50 PM
  5. Replies: 1
    Last Post: 10-21-2005, 02:05 PM

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