View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
[email protected] roniaelm@hotmail.com is offline
external usenet poster
 
Posts: 54
Default Formatting the background of unlocked cells

Hello,

I have this code that enables users to change the font colour of
unlocked cells to red of a protected sheet without needing the
password:

Sub Macro2()
With Selection
ActiveSheet.Unprotect Password:="password"
With Selection.Font
.Color = -16776961
End With
End With
ActiveSheet.Protect Password:="password"
End Sub

How can I use this same code but format the background colour of a
cell to red rather then the font colour?

Thanks for all of your help!