route217
asked on
vba code or alternative method to lock one column in worksheet
Hi Experts Excel 2007
How would I lock/protect column dw and leave remaining column unprotected.
How would I lock/protect column dw and leave remaining column unprotected.
ASKER
Experts
I am assuming that I add this to the worksheet...module.
I am assuming that I add this to the worksheet...module.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Rgonzo1971's solution is good.
Named range will help you when your sheet dynamic. when you add new column or delete a column before the particular column your required column name will change but named range remain same we can access the column using the named range.
for ex:- create named range in column "DW" as "MyColumn"
ThisWorkbook.Names("MyColu mn").Refer sToRange.E ntireColum n.Locked = True
Named range will help you when your sheet dynamic. when you add new column or delete a column before the particular column your required column name will change but named range remain same we can access the column using the named range.
for ex:- create named range in column "DW" as "MyColumn"
ThisWorkbook.Names("MyColu
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks for the feedback experts testing.
pls try
Open in new window
Regards