+ Reply to Thread
Results 1 to 6 of 6

Select Specified Sheets, Not all sheets - Need your help!

  1. #1
    Forum Contributor
    Join Date
    12-19-2012
    Location
    Woodbridge, Virginia
    MS-Off Ver
    Excel 2010
    Posts
    111

    Select Specified Sheets, Not all sheets - Need your help!

    Hi VBA experts,

    I found this code online to protect/unprotect worksheets in my workbook. It seems to work fine only if you want your password protected sheets to unprotect and your unprotected sheets to get protected. What is the proper code to select specific sheets to protect/unprotect rather than all sheets in an entire workbook?

    Thank you in advance for your help!

    Please Login or Register  to view this content.

  2. #2
    Valued Forum Contributor
    Join Date
    08-10-2012
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    721

    Re: Select Specified Sheets, Not all sheets - Need your help!

    use

    Please Login or Register  to view this content.
    rename Sheet1 and Sheet2 and Sheet3 with the sheets you want to exclude from being passw protected

  3. #3
    Forum Contributor
    Join Date
    12-19-2012
    Location
    Woodbridge, Virginia
    MS-Off Ver
    Excel 2010
    Posts
    111

    Re: Select Specified Sheets, Not all sheets - Need your help!

    Thank you for the reply but I am getting an error when I try to run this code. Can you please let me know what I am doing wrong?

    Please Login or Register  to view this content.

  4. #4
    Valued Forum Contributor
    Join Date
    08-10-2012
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    721

    Re: Select Specified Sheets, Not all sheets - Need your help!

    dont use quotation marks or commas -use the code EXACTLY as i posted it.

  5. #5
    Forum Contributor
    Join Date
    12-19-2012
    Location
    Woodbridge, Virginia
    MS-Off Ver
    Excel 2010
    Posts
    111

    Re: Select Specified Sheets, Not all sheets - Need your help!

    That worked!!!

    Thank you!

  6. #6
    Valued Forum Contributor
    Join Date
    08-10-2012
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    721

    Re: Select Specified Sheets, Not all sheets - Need your help!

    happy to help. mark this thread as "solved" if you are satisfied with it.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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