Locking spreadsheets

H

Hentzer

I want to password protect my entire spreadsheet allowing others to edit ony
certain cells, can I do this or do I need to protect/unprotect each sheet of
the spreadsheet as I go along?


Angi
 
M

Mike H

Hi,

Select the cells you want to allow editing and then
Format|Cells|Protection Tab
Un-Check 'Locked'
Protect the sheet.

Mike
 
G

Gord Dibben

You can do it with a macro.

Sub ProtectAllSheets()
Application.ScreenUpdating = False
Dim N As Single
For N = 1 To Sheets.Count
With Sheets(N)
.Cells.Locked = True 'set locked on all cells to start
.Range("A1:A10").Locked = False 'set unlocked on a range
.Protect Password:="justme"
.EnableSelection = xlUnlockedCells
End With
Next N
Application.ScreenUpdating = True
End Sub

If your ranges differ on each sheet, you will have to work on each sheet
individually.


Gord Dibben MS Excel MVP
 

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

Top