Hi again Paul B,
Can use your help again. The direct scope of the workbook I'm working on
has changed. The work book has a total of 42 pages. The first sheet is more
or less a report based on the second sheet which is a summary of the
remaining 40 sheets which are identical. I was working with the code you
provided me but needless to say I've been pulling my hair out.
I want to lock the whole workbook and allow certain cells to be edited. The
problem I have is the first two pages have different cells I want the users
to be able to edit while the last 40 are all identical.
Here is what I put together. Hope you can help..
The code you submitted:
Sub Protect_All_Sheets()
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
'unlock the cells below
ws.Range("$A$1,$A$2,$A$3,$C$8:$I$27,$C$29:$I$38" & _
",$C$40:$I$51,$C$53:$I$106,$C$108:$I$135" & _
",$C$137:$I$198,$C$200:$I$215,$C$217:$I$228" & _
",$C$230:$I$251,$C$253:$I$280,$C$282:$I$289" & _
",$C$291:$I$294").Locked = False
ws.Protect Password:="1234"
Next ws
End Sub
NEW PROBLEM: Lock all sheets with these exceptions.
Bottom Line Protection (Sheet 1) Range of Cells:
=$G$1,$B$5,$D$5,$B$45:$G$46,$A$48:$G$57,$B$58:$G$58,$A$63:$G$72,$A$78:$A$80,$D$83:$E$83,$A$85,$D$86:$E$86,$A$88,$D$89:$E$89,$A$91,$D$93:$E$93,$A$95,$B$97,$D$99:$E$99,$A$102
______________________________________________________________________
Project Manhour Sumary (Sheet 2) Range of Cells:
=$G$8:$G$15,$G$17:$G$32,$G$34,$G$37,$G$40,$G$43,$G$46,$G$49,$G$52,$G$55,$G$58:$G$157,$G$159:$G$210,$G$212:$G$311,$G$313,$G$316,$G$319,$G$322:$G$337,$G$339:$G$350,$G$352:$G$363,$G$365:$G$390,$G$392:$G$417,$G$419:$G$444,$G$446,$G$449,$G$452,$G$455,$G$458
______________________________________________________________________
WE Apr 24 - WE Jan 1 ( Weeks Ending Sheet 3 thru Sheet 40) or (We Apr 24,WE
May 1,We May 8,....etc..)
Range of Cells:
Range 1:
=$C$8:$I$15,$C$17:$I$32,$C$34:$I$35,$C$37:$I$38,$C$40:$I$41,$C$43:$I$44,$C$46:$I$47,$C$49:$I$50,$C$52:$I$53,$C$55:$I$56,$C$58:$I$157,$C$159:$I$210,$C$212:$I$311,$C$313:$I$314,$C$316:$I$317,$C$319:$I$320,$C$322:$I$337,$C$339:$I$350,$C$352:$I$363
Range 2:
=$C$446:$I$447,$C$449:$I$450,$C$452:$I$453,$C$455:$I$456,$C$458:$I$459,$C$461:$I$466
I had to create 2 sets of ranges because trying to include them all in one
set would keep blowing up.
I'd appreceiate any help you can give me.
As always Thanks,
Shawn