View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Ardus Petus Ardus Petus is offline
external usenet poster
 
Posts: 718
Default setting background

CDRLWs.Range("A1").Interior.Colorindex = 3

HTH
--
AP

"Elena" a écrit dans le message de news:
...
I want to set the background of a cell in Excel depending on a condition.
I've tried two methods:

If intVal = 3 Then
CDRLWs.Range("a1").Font.Background = 3
End If

If intVal = 3 Then
CDRLWs.Range("a1").Font.Background = "Red"
End If

Neither are working.

Any suggestions?

Thanks in Advance!
~Elena