View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Change cell format based on its color

Is the color produce by conditional formatting?

If not

assuming the sheet is unprotected.

For each cell in activesheet.UsedRange
if cell.interior.ColorIndex = 5
cell.Locked = False
end if
Next

--
Regards,
Tom Ogilvy

"Anders" wrote in message
oups.com...
Dear Experts

Being new to VBA I have following question.
In an Excel 2003 workbook, where all cells as default are protected, I
would like to unprotect cells with a specific color.
Can any of you give a clue?

Thanks in advance
Anders
Copenhagen