Cell Protection in VB

Cat129

Board Regular
Joined
Oct 20, 2012
Messages
96
Morning All,

I would like to protect a workbook using VB, so that I can add the protection to the end of an update macro I have created

I would like to lock certain columns so they can't be edited at all, some that the user can do what they want with, and others that they can only input data.

Columns A:S - Lock completely, no input, but can select the cells
Columns T:X - Users can input there own info and format cells if they wish
Columns Y:Z - Users can not input data but can format cells if they wish
Columns AA:AE - Users can input there own info and format cells if they wish
Columns AF:... - Lock completely

I would also like to restrict them so they can not add or remove columns or rows

Finally a password at the end

Thanks for your help

Cat
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
You can't mix and match like that I'm afraid. You either allow formatting of locked cells, or you don't; it is not possible to restrict that to particular ranges.
 
Upvote 0
You can't mix and match like that I'm afraid. You either allow formatting of locked cells, or you don't; it is not possible to restrict that to particular ranges.

I thought that might have been the case, but wanted to check

Thanks for letting me know

Cat
 
Upvote 0

Forum statistics

Threads
1,223,714
Messages
6,174,051
Members
452,542
Latest member
Bricklin

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