Protecting a worksheet

Y

YS

I am trying to see if there is a way to protect a
worksheet, but leave a few cells unprotected (including
their formats). I want to be able to change the color of
the cell and font after the sheet is protected. I tried
unlocking the cells and that allows for editing, but it
still locks the formatting of the cell.
Is there any way to have a worksheet protected, but allow
for cell color and font color changes in certain cells?
 
D

Dave Peterson

The feature you want was added in xl2002.

You could provide a macro that unprotects the worksheet, colors the cells, and
reprotects the worksheet.

Then the user would run your macro whenever they wanted to format the cell.
 
S

StargateFan

The feature you want was added in xl2002.

You could provide a macro that unprotects the worksheet, colors the cells, and
reprotects the worksheet.

I am very happy to provide you with unprotect/protect syntax that
might work in your script somehow. This is code that Dave Peterson
kindly gave me this past week that saved all my projects as until I
had this, I had to keep the sheets unprotected, making them vulnerable
to deletions and accidental screw-ups! <g>



Sub MacroName()
'
'
With ActiveSheet
.Unprotect
(code goes here)
.Protect
End With
End Sub



You just need to name the script by changing the "MacroName", and add
the colour coding, replacing the "(code goes here)" above. <g>

I'm just a user and don't know vb so hoping that someone can help you
with the colour coding. But hope that you find the above useful in
some way.

Good luck!
 
Top