View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
[email protected] nednorge@yahoo.no is offline
external usenet poster
 
Posts: 4
Default Password protect it


Hello

I did as you suggested and it work good.
The problem now is to prtect it with a password.
I tried a view things which I read in this discussion group but I
can't get it to work.
I manage to unprotect the password but not to protect it again.
I protected the sheet with password as normal in excell
The macro unprotects but doesn't protect with password afterwards.
Can you help out,.

Eric

code

ActiveSheet.Unprotect Password:="test"
For Each rArea In Rng2.Areas
With rArea
.Font.ColorIndex = 35
.Formula = "a"
With .Interior
.ColorIndex = 35
.Pattern = xlSolid
End With
End With
Next rArea


ActiveSheet.Protect _
DrawingObjects:=True, _
Contents:=True, _
Scenarios:=True

ActiveSheet.Protect Password:="test"