Sheet Protection

sturnusek

Board Regular
Joined
Sep 20, 2018
Messages
51
Hi there,

I'm trying to put a code into my macro, but I struggle with finding right arguments for the code.

I'm want cells from A:F to be locked and be unselectable, and range from H:Q to be locked and selectable.

Any ideas?

Thanks
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
Hi there,

I'm trying to put a code into my macro, but I struggle with finding right arguments for the code.

I'm want cells from A:F to be locked and be unselectable, and range from H:Q to be locked and selectable.

Any ideas?

Thanks

Select the cells you don't want to be locked, right click on them -> format cells -> protection untick Locked
make sure that the ones you do want protected have Locked ticked

when you protect the worksheet, the ones that are unticked will not be protected?
 
Last edited:
Upvote 0
Select the cells you don't want to be locked, right click on them -> format cells -> protection untick Locked
make sure that the ones you do want protected have Locked ticked

when you protect the worksheet, the ones that are unticked will not be protected?

The problem is, I want my entire workbook to be protected. With the difference, that I want cells from A:F to be locked & cells to be unselectable, and cells from H:Q to be locked & selectable. As per default Workbook protection once you set a password and apply settings to the locked cells, I can only achieve half of what I want to do. I want all of this to happen within a macro, as it's going to be a part of something else that its already in place.

Thanks
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,820
Messages
6,181,154
Members
453,021
Latest member
Justyna P

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