I've googled my *** off on this but I can't find anything that works for me. What I want to do:
When a user changes the value of a specific cell on Sheet1 to 0, lock a specific range of cells on Sheet2. If the user changes the value of that specific cell to anything else than 0, unlock that specific range of cells on Sheet2
I know how to set up a worksheet change event and lock cells on the same sheet, but I can't find how to lock cells on other sheets.
For example:
User changes the value of Range("I4") on Sheet1 to 0 --> the Range("C10,I10,O10,U10,AA10") on Sheet2 becomes Locked
User changes the value of Range("I4") on Sheet1 to anything else than 0 --> the Range("C10,I10,O10,U10,AA10") on Sheet2 becomes Unlocked
User changes the value of Range("I5") on Sheet1 to 0 --> the Range("C11,I11,O11,U11,AA11") on Sheet2 becomes Locked
User changes the value of Range("I5") on Sheet1 to anything else than 0 --> the Range("C11,I11,O11,U11,AA11") on Sheet2 becomes Unlocked
...and so on
So simply put, an input of 0 in a specific cell on Sheet1 means that a correspending range of cells on Sheet2 will not be available for input. A very simple concept but I can't get it to work and I can't find a solution anywhere. Any help would be very much appreciated!
When a user changes the value of a specific cell on Sheet1 to 0, lock a specific range of cells on Sheet2. If the user changes the value of that specific cell to anything else than 0, unlock that specific range of cells on Sheet2
I know how to set up a worksheet change event and lock cells on the same sheet, but I can't find how to lock cells on other sheets.
For example:
User changes the value of Range("I4") on Sheet1 to 0 --> the Range("C10,I10,O10,U10,AA10") on Sheet2 becomes Locked
User changes the value of Range("I4") on Sheet1 to anything else than 0 --> the Range("C10,I10,O10,U10,AA10") on Sheet2 becomes Unlocked
User changes the value of Range("I5") on Sheet1 to 0 --> the Range("C11,I11,O11,U11,AA11") on Sheet2 becomes Locked
User changes the value of Range("I5") on Sheet1 to anything else than 0 --> the Range("C11,I11,O11,U11,AA11") on Sheet2 becomes Unlocked
...and so on
So simply put, an input of 0 in a specific cell on Sheet1 means that a correspending range of cells on Sheet2 will not be available for input. A very simple concept but I can't get it to work and I can't find a solution anywhere. Any help would be very much appreciated!