Protection Question Relating to Formatting

DrDave6

New Member
Joined
Oct 1, 2014
Messages
20
I'm using Excel 2010.

I have all cells locked in a worksheet, and am using the following code.

ActiveSheet.Protection.AllowEditRanges.Add Title:="dhRange", Range:=Rows("17:9000") ' Allow rows 17 to 9000 t0 be edited
ActiveSheet.Protect Password:="ThisIsMyPassword" ' Protect the worksheet

I expect (want) rows 1-16 to be fully protected. However, the users should be able to change the formatting colour in rows 17-9000.

How can I do this? All suggestions appreciated.
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).

Forum statistics

Threads
1,217,386
Messages
6,136,289
Members
450,002
Latest member
bybynhoc

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top