+ Reply to Thread
Results 1 to 3 of 3

Trouble with macros to lock and unlock worksheets

  1. #1
    Registered User
    Join Date
    01-11-2017
    Location
    Chicago, IL
    MS-Off Ver
    2010
    Posts
    80

    Trouble with macros to lock and unlock worksheets

    This is probably very easy to fix, but I haven't been able to figure out what I'm doing wrong. I'm using Excel 2010 (I know- it's ancient). I have a workbook that I want to lock the formulas on all sheets so they aren't accidentally overwritten when adding data. I found 2 macros to lock and unlock all sheets in a workbook at the same time so I don't have to go through each one individually. I ran the lock the first time and protected the workbook, and everything was fine. Then I unlocked everything to edit something (it was locking the Target date field [B1] in the 6 yellow highlighted tabs, which I want to be able to change). I don't know how to exclude the dates from being locked, and I can't get all the formula cells to lock again. Thanks in advance!
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    12-02-2009
    Location
    Austin, Tx
    MS-Off Ver
    Office 365 64-Bit, 2108, build 14326.21018
    Posts
    3,952

    Re: Trouble with macros to lock and unlock worksheets

    Try this to protect just the formulas.
    Please Login or Register  to view this content.
    I know I'm not stupid, but I suspect I'm a lot stupider than I think I am

  3. #3
    Registered User
    Join Date
    01-11-2017
    Location
    Chicago, IL
    MS-Off Ver
    2010
    Posts
    80

    Re: Trouble with macros to lock and unlock worksheets

    Thank you so much! That works great.

+ 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. Store worksheet settings, unlock worksheets when object is created, lock when destroyed
    By OldManExcellor in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-29-2016, 03:01 AM
  2. Lock Unlock Row
    By rizmomin in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-28-2012, 03:57 PM
  3. Lock/Unlock some cells in a row
    By processchip in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-16-2011, 01:05 PM
  4. lock/unlock cells
    By john tempest in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 03-16-2006, 03:55 PM
  5. Replies: 3
    Last Post: 01-11-2006, 09:00 PM
  6. [SOLVED] How can I lock worksheets while still allowing macros to operate?
    By enginguven in forum Excel General
    Replies: 2
    Last Post: 01-09-2006, 06:10 PM
  7. [SOLVED] How can I lock worksheets while still allowing macros to operate?
    By enginguven in forum Excel General
    Replies: 1
    Last Post: 01-09-2006, 05:50 PM

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