+ Reply to Thread
Results 1 to 4 of 4

unlock sheets apply macro then lock sheets again

  1. #1
    Valued Forum Contributor
    Join Date
    12-01-2011
    Location
    Philippines
    MS-Off Ver
    Excel 2016
    Posts
    949

    unlock sheets apply macro then lock sheets again

    Hi,

    Initially i formatted the protection of all cells of all sheets in the workbook to "unlocked"
    Then protected all the sheets

    Below is a macro that should unprotect all the sheets apply lock protection to all cells with data to all sheets in the workbook and then protects all the sheets again but does not work

    Any ideas?

    Please Login or Register  to view this content.
    Last edited by k1dr0ck; 10-22-2015 at 04:33 AM.

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: unlock sheets apply macro then lock sheets again

    Your ranges have to refer to the desired worksheet:

    Please Login or Register  to view this content.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: unlock sheets apply macro then lock sheets again

    You might also try this:

    Please Login or Register  to view this content.

  4. #4
    Valued Forum Contributor
    Join Date
    12-01-2011
    Location
    Philippines
    MS-Off Ver
    Excel 2016
    Posts
    949

    Re: unlock sheets apply macro then lock sheets again

    used the second code, thanks!

+ 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. Apply a macro to all sheets except one of the sheets
    By Steve2107 in forum Excel General
    Replies: 1
    Last Post: 03-23-2015, 11:42 PM
  2. unlock sheets macro not working
    By bdogg33830 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-20-2015, 02:09 PM
  3. Lock and unlock sheets with password , diffrent usernames different actions
    By Barry Engelbrecht in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-20-2013, 07:06 AM
  4. [SOLVED] Macro to Unprotect sheets-unlock range of cells-protect sheets
    By jrace in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-09-2013, 10:45 AM
  5. Lock and Unlock sheets in a shared workbook?
    By Dulanic in forum Excel General
    Replies: 0
    Last Post: 02-15-2011, 01:24 PM
  6. Lock and Unlock Sheets based on Cell values
    By Mujahid_Sgd in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-02-2011, 05:18 AM
  7. using VB code to unlock and lock different areas on multiple sheets
    By Healthwatch in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-04-2010, 11:12 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