It Then Else Question
Detail_Report.Cells(61, Column).Select
Hi. Instead of selecting, would something like this help?
Detail_Report.Cells(61, Column).Interior.Color = _
IIf(LinkBudget.Range("E143") < -14, 6750105, 255)
= = = = = = = = = =
HTH :)
Dana DeLouis
On 10/6/09 12:27 PM, William Wolfe wrote:
Thanks to all.
W. Wolfe
"Mike wrote in message
...
Hi,
It's actually the WITH statement giving the error, there's no END WITH.
Try
this
If LinkBudget.Range("E143")< -14 Then
Detail_Report.Cells(61, Column).Select
With Selection.Interior
.Color = 6750105
End With
Else
Detail_Report.Cells(61, Column).Select
With Selection.Interior
.Color = 255
End With
End If
Mike
"William Wolfe" wrote:
What is wrong with the following code? I get a compile error 'Else
without
IF"
If LinkBudget.Range("E143")< -14 Then
Detail_Report.Cells(61, Column).Select
With Selection.Interior
.Color = 6750105
Else
Detail_Report.Cells(61, Column).Select
With Selection.Interior
.Color = 255
End If
Thanks,
W Wolfe
|