+ Reply to Thread
Results 1 to 6 of 6

How to protect multiple worksheets from edits within an excel workbook

  1. #1
    Registered User
    Join Date
    03-04-2017
    Location
    NJ
    MS-Off Ver
    Excel for Mac Version 15.31
    Posts
    75

    How to protect multiple worksheets from edits within an excel workbook

    Good morning, everyone!

    I have a workbook that has around 20 worksheets, and all of these worksheets have formulas embedded in them and I would like to find a way to protect MOST of the worksheets from edits at once (to prevent people from unknowingly mess with the formulas and thereby corrupting them). In the past, I would go in each worksheet and protect each sheet one at a time but this is very unwieldy and time consuming. My question is: Is there a faster way to protect most of the worksheets from edits with some type of macro or vba? In particular, how do I tell excel to protect all worksheets EXCEPT for worksheets titled "Worksheet A", and "Worksheet B", for example?

    I went online and searched and it looks like, regarding protecting workbooks, I can only protect the structural commands of the workbook, i.e., which means end users can't add or remove sheets or change sheet names, but this is not what I want.

    I know very little about macro or vba, but I'm willing to learn. I look forward to hearing your advice on this!

    Thank you so much for your time.

    Anita

  2. #2
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,327

    Re: How to protect multiple worksheets from edits within an excel workbook

    Hi Anita,

    You can try this...

    Please Login or Register  to view this content.
    Just place the names of the worksheet you would like to protect inside the array.
    HTH
    Regards, Jeff

  3. #3
    Registered User
    Join Date
    03-04-2017
    Location
    NJ
    MS-Off Ver
    Excel for Mac Version 15.31
    Posts
    75

    Re: How to protect multiple worksheets from edits within an excel workbook

    Hi Jeff,

    Your vba code worked like magic!!! Thank you so much for your assistance and time.

    One quick follow up question for you: Let's say that I want to go in and unlock all of those sheets at once. Is there a similar version of the vba code that you can show me?

    Thanks again for everything,

    Anita

  4. #4
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 365
    Posts
    8,081

    Re: How to protect multiple worksheets from edits within an excel workbook

    Change:
    Please Login or Register  to view this content.
    to
    Please Login or Register  to view this content.
    You can say "THANK YOU" for help received by clicking the Star symbol at the bottom left of the helper's post.
    Practice makes perfect. I'm very far from perfect so I'm still practising.

  5. #5
    Registered User
    Join Date
    03-04-2017
    Location
    NJ
    MS-Off Ver
    Excel for Mac Version 15.31
    Posts
    75

    Re: How to protect multiple worksheets from edits within an excel workbook

    Wow... I didn't realize the change to VBA could be so simple. Thank you so much Mumps1 for your assistance!

    Anita

  6. #6
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 365
    Posts
    8,081

    Re: How to protect multiple worksheets from edits within an excel workbook

    You are very welcome.

+ 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. Replies: 1
    Last Post: 06-28-2013, 04:30 PM
  2. Replies: 0
    Last Post: 03-12-2013, 02:33 AM
  3. [SOLVED] How do I protect my Macros from unwanted edits
    By Steverizer in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-07-2013, 06:30 PM
  4. Protect multiple worksheets in a workbook at one time in EXCEL.
    By Daniel N. (McKinney, TX) in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-21-2005, 12:05 AM
  5. why can i no longer protect multiple worksheets in Excel
    By Michael in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-06-2005, 02:05 PM
  6. [SOLVED] why can i no longer protect multiple worksheets in Excel
    By jjinlotusland in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 11:05 AM
  7. [SOLVED] why can i no longer protect multiple worksheets in Excel
    By jjinlotusland in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 10:05 AM
  8. why can i no longer protect multiple worksheets in Excel
    By jjinlotusland in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 02:05 AM

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