touyets
08-28-2010, 04:47 AM
Hi again,
you've been amazing at helping with my first issue. Here's a new one i've tried to work out.
The listbox1 I have at the minute creates an item for each visible cell in column 1. I would like for that specific item to show up in red if the value of the cell from the same row but in column 5 is different than nothing (that's to say : <>""). What i have so far:
ListBox1.Clear
Dim c As Long
c = 1
For Each cll In Range("Table1").Columns(1).SpecialCells(xlCellTypeVisible).Cells
ListBox1.AddItem cll.Value
If Cells(cll, 5).Value <> "" Then
ListBox1.items(c).ForeColor = vbRed
End If
c = c + 1
Next cll
you've been amazing at helping with my first issue. Here's a new one i've tried to work out.
The listbox1 I have at the minute creates an item for each visible cell in column 1. I would like for that specific item to show up in red if the value of the cell from the same row but in column 5 is different than nothing (that's to say : <>""). What i have so far:
ListBox1.Clear
Dim c As Long
c = 1
For Each cll In Range("Table1").Columns(1).SpecialCells(xlCellTypeVisible).Cells
ListBox1.AddItem cll.Value
If Cells(cll, 5).Value <> "" Then
ListBox1.items(c).ForeColor = vbRed
End If
c = c + 1
Next cll