View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
John Fuller John Fuller is offline
external usenet poster
 
Posts: 40
Default Clear color but not pattern?

Try this:

If Cells(x, y).Interior.ColorIndex = 8 Then
myPattern = Cells(x,y).Interior.Pattern
Cells(x, y).Interior.ColorIndex = xlNone
Cells(x, y).Interior.Pattern = myPatter
End If

jayklmno wrote:
I am having issues with the cell color changing and updating, and removing
pattern information in the same cell.

I need to look through a data and color it a certain color and when the data
is revised, I uncolor it. Users have added patterns to denote other stuff and
the remove color as desribed below, also removes the pattern. Is there a way
to remove the color and retain the pattern?

If Cells(x, y).Interior.ColorIndex = 8 Then
Cells(x, y).Interior.ColorIndex = xlNone
End If

Thanks,
Jay