B
bttman
Cell B3 has a data validation dropdown list.
When I change the selection it triggers a function on for that
worksheet object:
Private Sub Worksheet_Change(ByVal Target As Range)
Select Case Target.Address
Case Range("ModType").Address
ValidateCoding
End Select
End Sub
Where ModType is the range name for B3
The ValidateCoding routine lincludes:
With Range("Coding")
.FormatConditions.Delete
.FormatConditions.Add Type:=xlExpression,
Formula1:=formatstring
.FormatConditions(1).Interior.ColorIndex = 3
End With
where the "Coding" range refers to cell B4.
The formula part of the conditional formatting works fine, but I cannot
seem to get the FormatConditions(1) to accept a color. If I run the
same command directly as a subroutine it works fine???
HELP!
Thanks in advance!
joe
When I change the selection it triggers a function on for that
worksheet object:
Private Sub Worksheet_Change(ByVal Target As Range)
Select Case Target.Address
Case Range("ModType").Address
ValidateCoding
End Select
End Sub
Where ModType is the range name for B3
The ValidateCoding routine lincludes:
With Range("Coding")
.FormatConditions.Delete
.FormatConditions.Add Type:=xlExpression,
Formula1:=formatstring
.FormatConditions(1).Interior.ColorIndex = 3
End With
where the "Coding" range refers to cell B4.
The formula part of the conditional formatting works fine, but I cannot
seem to get the FormatConditions(1) to accept a color. If I run the
same command directly as a subroutine it works fine???
HELP!
Thanks in advance!
joe