Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Cell colour doesn't delete
Thanks all, Don's suggestion is good for what I want.
Sandy "Sandy" wrote in message ... I have the folloing code, why does the cell color in cell C10 not delete when the value of cell C8 is ""? Thanks Sandy Private Sub Worksheet_Change(ByVal Target As Excel.Range) Application.ScreenUpdating = False Application.EnableEvents = False For Each mycell In Range("C8:K8,M8:U8") With mycell If mycell.Value = "" Then .Interior.ColorIndex = 36 .Font.ColorIndex = 1 .BorderAround LineStyle:=xlContinuous, Weight:=xlThin, ColorIndex:=11 ElseIf mycell.Value < "" Then .Interior.ColorIndex = 11 .Font.ColorIndex = 45 .Borders.LineStyle = xlNone End If End With With mycell.Offset(2) If mycell.Value = 0 Then .Interior.ColorIndex = 11 .Value = "" ElseIf mycell.Value 0 Then .Interior.ColorIndex = 36 .Font.ColorIndex = 1 ElseIf mycell.Value = "" Then .Interior.ColorIndex = xlColorIndexNone .Value = "" End If End With Next mycell Application.ScreenUpdating = True Application.EnableEvents = True End Sub |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Cell colour doesn't delete
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
textBox font colour the same as cell font colour???????? | Excel Discussion (Misc queries) | |||
How can colour of cell shading be fixed to one colour | Excel Discussion (Misc queries) | |||
if cell colour is then change cell colour in range | Excel Programming | |||
Delete row data and cell colour | Excel Programming | |||
change a cell background colour to my own RGB colour requirements | Excel Discussion (Misc queries) |