• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Lock/unlock cells in a worksheet based on dropdown selection in another worksheet

sinchu

New Member
dear all,

could you please help me to find a solution for my question how to lock/unlock cell in a particular worksheet based on a dropdown selection of Yes or No in another worksheet?
 
sinchu
This is one solution ...
Control is in Sheet2 Cell B3 and un/lock will act in Sheet1 Cell B3.
I also added color which shows lock/unlock case.
 

Attachments

  • Sinchu.xlsb
    35.2 KB · Views: 3
hello vletm,

thanks but i would like to clarify my question again. sorry for the confusion. when i select Yes in the dropdown in sheet 2, the cell b3 in sheet 1 should be non-editable and if i select No from the dropdown, the cell b3 in sheet 1 should be editable.
Thanks to reply (as i am not a coding person:|) and sorry for the unclear query.
 
sinchu
Un/Locked ... non/editable
... could be different!
... and still one cell.
 

Attachments

  • Sinchu.xlsb
    35.8 KB · Views: 3
sinchu
If non/editable then this would be more near ...
Ps. In the beginning, all cells are Locked.
 

Attachments

  • Sinchu.xlsb
    35.8 KB · Views: 4
sinchu
Un/Locked ... non/editable
... could be different!
... and still one cell.
DEar Vletm,

Thank you. this code is working but for one condition.
in my actual scenario, the dropdown is given in a different cell in sheet 1 and the editable/non-editable cell is different in sheet 2.(ie, not the same cell in both sheets as is in ur sample which is B3) . i tried to modify accordingly but for me, if i give No in the dorpdown also the cell is non-editable:(.

Could you please help me.
 
sinchu
If non/editable then this would be more near ...
Ps. In the beginning, all cells are Locked.
Dear vletm,

This file was showing a pop up message which was not closing evn after tried many times to close it which finally ended up in asking task manager to end task.
 
sinchu
Your original #1 Reply:
how to lock/unlock cell in a particular worksheet based on a dropdown selection of Yes or No in another worksheet?
This works!

Your #6 Reply gives 'so different case'... so different!

You should sent a Sample File,
which layout is same as Your 'normal' file!
with needed functionalities of un/locking!
 
sinchu
Your original #1 Reply:
how to lock/unlock cell in a particular worksheet based on a dropdown selection of Yes or No in another worksheet?
This works!

Your #6 Reply gives 'so different case'... so different!

You should sent a Sample File,
which layout is same as Your 'normal' file!
with needed functionalities of un/locking!
 

Attachments

  • sample.xlsm
    14.7 KB · Views: 5
sinchu
Your original #1 Reply:
how to lock/unlock cell in a particular worksheet based on a dropdown selection of Yes or No in another worksheet?
This works!

Your #6 Reply gives 'so different case'... so different!

You should sent a Sample File,
which layout is same as Your 'normal' file!
with needed functionalities of un/locking!
Hi vletm,
I have attached the sample i ws trying on. i tried to change the cell name in sheet 1 from B3 to D3..then its not working.
 
sinchu
It's a challenge if You write about different (my actual scenario) file
than I could expect!
You did new file
You didn't copy all macros from my file
After copy ... working
 

Attachments

  • sample.xlsm
    16 KB · Views: 2
Back
Top