Macro for protecting sheet

  • Thread starter Thread starter JoeP
  • Start date Start date
J

JoeP

I have recorded a macro that protects a sheet. The coding that I have is

ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True

When I protect the sheet I want it so that only Unlocked cells can be
selected. My coding above does not do this.

What do I need to do to my code to make it so that a user cannot select
Unlocked cells, and only allow the user to select only Unlocked cells.

Thanks.
 
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
ActiveSheet.EnableSelection = xlUnlockedCells


Gord Dibben MS Excel MVP
 
Back
Top