Hello,
I am looking to lock and protect the whole active sheet except for the whole column with a specific header "Desk", which is Column 3.
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Date[/TD]
[TD]Desktop[/TD]
[TD]Desk[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
In my code, the unlock applies to Column 2 instead of Column 3 as that is the first found match to the criteria.
How can i make a dynamic FIND/SEARCH to Header "Desk" so that the entire Column 3 will be unlocked for user input?
Can someone please suggest with some coding to help resolve my problem?
Here is my VBA code:
ActiveSheet.Cells.Locked = True
Rows(1).Find("Desk").Cells.EntireColumn.Locked = False
ActiveSheet.Protect
Thank you for your help in advance.
I am looking to lock and protect the whole active sheet except for the whole column with a specific header "Desk", which is Column 3.
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Date[/TD]
[TD]Desktop[/TD]
[TD]Desk[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
In my code, the unlock applies to Column 2 instead of Column 3 as that is the first found match to the criteria.
How can i make a dynamic FIND/SEARCH to Header "Desk" so that the entire Column 3 will be unlocked for user input?
Can someone please suggest with some coding to help resolve my problem?
Here is my VBA code:
ActiveSheet.Cells.Locked = True
Rows(1).Find("Desk").Cells.EntireColumn.Locked = False
ActiveSheet.Protect
Thank you for your help in advance.