+ Reply to Thread
Results 1 to 4 of 4

This code not working in a Protected Sheet, can any one pls edit this code

  1. #1
    Forum Contributor
    Join Date
    04-06-2016
    Location
    Singapore
    MS-Off Ver
    MS Office 365 & 2010
    Posts
    698

    This code not working in a Protected Sheet, can any one pls edit this code

    Using some part of below code, I can Hide & Lock row and after 1 row hide & lock, this code not working on a protected sheet ......

    Please Login or Register  to view this content.

  2. #2
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: This code not working in a Protected Sheet, can any one pls edit this code

    You need to unprotect the sheet at the start of the routine and restore the protection at the end. If the sheet is password protected by the user, then your code won't know the password and you are out of luck. To test if the worksheet has been protected, look at the sheet's .ProtectContents property.
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

  3. #3
    Forum Contributor
    Join Date
    04-06-2016
    Location
    Singapore
    MS-Off Ver
    MS Office 365 & 2010
    Posts
    698

    Re: This code not working in a Protected Sheet, can any one pls edit this code

    Below code working on Protect sheet, after adding additional code its not working

    Can you please add below codes

    Please Login or Register  to view this content.

  4. #4
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: This code not working in a Protected Sheet, can any one pls edit this code

    You can't have two different Worksheet_Change events, they need to be combined.

+ 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] Validation code with Protected sheet
    By sandu1 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 06-08-2016, 11:49 PM
  2. [SOLVED] Small Edit in Code to Run For 1 Sheet Only
    By loverfellow in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-27-2016, 07:47 AM
  3. [SOLVED] Edit Sheet Code Via Macro
    By boss1982 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-31-2013, 09:26 AM
  4. [SOLVED] New to arrays-BubbleSort code(Working)-How do I edit to sort by 2nd column then 3rd?
    By mc84excel in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 05-10-2013, 06:29 AM
  5. [SOLVED] VBA code not working with protected sheets
    By Mrs T in forum Excel General
    Replies: 16
    Last Post: 07-31-2012, 03:29 PM
  6. Edit code to copy whole sheet
    By Sirishgreen in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-12-2008, 08:06 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