Thread: Syntax
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default Syntax

Try this:-
Before you run this think again and make sure this is what you want because
it will remove all your conditional formatting (not just the colours) and
manually coloured cells. BEWARE.

Sub surface()
ActiveSheet.UsedRange.Interior.ColorIndex = xlNone
ActiveSheet.UsedRange.FormatConditions.Delete
End Sub

Mike


" wrote:

Hi, all:

In one of my worksheets, some cells are MANUALLY filled in with color
"bright green" and some other cells will change color to "bright
green" with CONDITIONAL FORMAT of if cell value is 0 then cell color
is "bright green".

Assume I already finish all the work in this worksheet, I just want to
make a button. Once I click the button, then all cells color will be
changed to "No Fill". The only thing I know is the syntax for the
cells filled with color manually which is

Worksheets("Sheet1").Cells.Interior.ColorIndex =xlNone

How about the cells changing color based on cell value 0?

I appreciate your help!

Thanks,

Jorge