Anyway of protecting a cell without using the protection facility ?

Pauljj

Well-known Member
Joined
Mar 28, 2004
Messages
2,047
I know this must sound an odd request and there will be people scratching their heads as to why I want to protect cells without using the Protection function....it is a long story but in a snapshot I am using a Worksheet Change code which won't work once the sheet is protected. I have tried getting around this without luck

I need users to be able to format a range of cells but not to delete or type over the cells (ie removing the formulas in the cells) Does anyone have any bright ideas as I'm all out of them ?


Cheers
Paul
 
Why not unprotect in your code

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Me.Unprotect Password:="pw"
'
'your code here
'
Me.Protect Password:="pw"
End Sub
 
Upvote 0
Perfect, modified slightly to allow them still to modify, thanks for steering me in the right direction
 
Upvote 0

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