View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Gary Brown[_5_] Gary Brown[_5_] is offline
external usenet poster
 
Posts: 236
Default Can Excel's field fill colors be changed using "IF" statements?

What do you mean by 'fields'?
If you're talking about cells.
myrange.Interior.ColorIndex = 6 'yellow
myrange.Interior.ColorIndex = 3 'red
myrange.Interior.ColorIndex = 5 'blue
If you're talking about listboxes, textboxes, comboboxes...
Me.ListBox1.BackColor = "&H0000FFFF&" 'yellow
Me.ListBox1.BackColor = "&H000000FF&" 'red
Me.ListBox1.BackColor = "&H00FF0000&" 'blue

--
Hope this helps.
If it does, please click the Yes button.
Thanks in advance for your feedback.
Gary Brown



"JHG" wrote:

I'm trying to use "IF" staements in Excel to pull values into fields as well
as to change the field fill color based on certain parameters. Pulling the
values in is the easy part, but can the field fill colors be controlled as
well?