Secure multiple sheets at once

%3CLINGO-SUB%20id%3D%22lingo-sub-1013930%22%20slang%3D%22en-US%22%3ESecure%20multiple%20sheets%20at%20once%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1013930%22%20slang%3D%22en-US%22%3E%3CP%3EI%20want%20to%20block%20identical%20specific%20cells%20from%20editing%20in%2031%20separate%20worksheets.%20Is%20there%20a%20way%20to%20do%20this%20once%20for%20all%20sheets%20and%20not%20separately%20for%20each%20sheet%3F%3C%2FP%3E%3CP%3EThanks%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1013930%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Highlighted
New Contributor

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
Highlighted

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

Highlighted