Forum Discussion

tulygarb's avatar
tulygarb
Copper Contributor
Nov 17, 2019

Secure multiple sheets at once

I want to block identical specific cells from editing in 31 separate worksheets. Is there a way to do this once for all sheets and not separately for each sheet?

Thanks

2 Replies

  • Hello tulygarb 

     

    you can set the properties of cells in multiple sheets by selecting the first sheet and then Shift+Click the last sheet. Next, select the cells and apply the format and/or property. Since cell properties default to "Locked", you probably want to use this approach to unlock the cells that should be editable when the sheet is protected.

     

    In order for the protection to work, though, you must use the Protect Sheet command on each sheet in turn. This can be done manually or you could use a VBA macro that speeds this up.

     

    Sub test()
    For Each ws In ThisWorkbook.Worksheets
    ws.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
    Next ws
    End Sub