Locking cells

  • Thread starter Thread starter Patrick Simonds
  • Start date Start date
P

Patrick Simonds

I use the code below to lock worksheets in my workbook and it works fine,
but now I need et to prevent selection of locked cells. I tried adding ,
EnableSelection = xlUnlockedCells to the end of the statement but I get an
Expected: Named parameter error

SH.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
 
Never mind I figured it out. Had to add a new line SH.EnableSelection =
xlUnlockedCells
 
Back
Top