locked cells

  • Thread starter Thread starter MillyMollyMandy
  • Start date Start date
M

MillyMollyMandy

I've heard there is a way of displaying which cells are
locked, a bit like showing the formulas.

I need to do this to provide a printout to prove that the
cells are protected.

Does anyone know how to do it?
 
for each cell in ActiveSheet.Usedrange
if cell.locked = False then
cell.Interior.ColorIndex = 6
end if
Next
activesheet.printout
for each cell in ActiveSheet.Usedrange
if cell.locked = False then
cell.Interior.ColorIndex = xlNone
end if
Next

If you sheet doesn't have colors then the above might work.

an easier way might be to execute

Sub SetState()
Activesheet.EnableSelection = xlUnlockedCells
End Sub

then when protection is in effect, only the unlocked cells can be selected.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top