+ Reply to Thread
Results 1 to 6 of 6

Making Checkboxe protection off when adding via Macro

  1. #1
    Registered User
    Join Date
    07-17-2014
    Location
    Scotland
    MS-Off Ver
    2010
    Posts
    19

    Making Checkboxe protection off when adding via Macro

    Hi,

    I have a Macro that adds checkboxes, I protect the sheet and when I run a different macro to uncheck all it doesn't work. Is there anyway that I can add the checkboxes but have the Protection Locked set to False? I've tested this by manually doing 3 of them and it works, but I have over 1000 boxes and no simple way to do them all at once.

    Please Login or Register  to view this content.
    Many thanks

    Colin

  2. #2
    Valued Forum Contributor Neil_'s Avatar
    Join Date
    04-19-2013
    Location
    Yorkshire
    MS-Off Ver
    Office 365 Enterprise E3 2013 / 2016
    Posts
    479

    Re: Making Checkboxe protection off when adding via Macro

    Hi
    protect your spreadsheets UserIntefaceOnly and your code will run regardless of whether protected or not.
    Type this directly into the Immediate Window and you're good to go.
    Please Login or Register  to view this content.
    if your code fails when the sheet is protected in this way, the problem isn't in the protection.
    Frob first, tweak later

  3. #3
    Registered User
    Join Date
    07-17-2014
    Location
    Scotland
    MS-Off Ver
    2010
    Posts
    19

    Re: Making Checkboxe protection off when adding via Macro

    Hey Neil,

    I already have that on each of my sheets, what I have is certain fields that I want the user to interact with, and it works ok (including them ticking a check box) - however due to the sheer volume of check boxes I use a macro to add and remove them (as some weeks I will have 1000, other I may have 2000) - Each time my sheet protection works. What I can't get to work is my macro that removed all checks in the check boxes (so if someone saved the file they may have left an item way down the list checked. I just want a play it safe uncheck all button, but they just don't work unless I manually right click and untick the locked box on each checkbox

    Thanks

    Colin

  4. #4
    Valued Forum Contributor Neil_'s Avatar
    Join Date
    04-19-2013
    Location
    Yorkshire
    MS-Off Ver
    Office 365 Enterprise E3 2013 / 2016
    Posts
    479

    Re: Making Checkboxe protection off when adding via Macro

    As long as you aren't using column 'A' for anything other than the checkboxes, change your code as below. Use the new sub to clear them.
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Last edited by Neil_; 10-18-2016 at 05:39 AM.

  5. #5
    Valued Forum Contributor Neil_'s Avatar
    Join Date
    04-19-2013
    Location
    Yorkshire
    MS-Off Ver
    Office 365 Enterprise E3 2013 / 2016
    Posts
    479

    Re: Making Checkboxe protection off when adding via Macro

    This will also allow you to filter on column A by the way.

    Funny how things work out. This post helped me with this other one.
    http://www.excelforum.com/showthread...97#post4503897
    Last edited by Neil_; 10-18-2016 at 02:21 AM.

  6. #6
    Registered User
    Join Date
    07-17-2014
    Location
    Scotland
    MS-Off Ver
    2010
    Posts
    19

    Re: Making Checkboxe protection off when adding via Macro

    Hey Neil, thanks for the help. Just tidying up some old posts

+ 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. Protection: Making Cell Values Copy-able but not Changeable?
    By lowprofile in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-14-2014, 05:10 PM
  2. [SOLVED] Adding worksheet protection but allowing form controls, macros
    By HeyInKy in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-05-2014, 01:27 PM
  3. Making all digist in a column 9 by adding 0 to make up the 9
    By jerrymag4 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 05-04-2012, 04:43 AM
  4. Replies: 1
    Last Post: 04-13-2012, 10:03 PM
  5. Adding Password Protection to code mods via VBA
    By realniceguy5000 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-24-2009, 01:36 PM
  6. Adding up the digits making up a number in a cell
    By Geir in forum Excel General
    Replies: 8
    Last Post: 04-16-2009, 09:58 AM
  7. [SOLVED] Making for adding and naming a new sheet
    By michaelberrier in forum Excel General
    Replies: 13
    Last Post: 05-29-2006, 03:10 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