This is a function so it makes a pattern of colors in listview
Code:
Public Function ChangeColors(LvwName As ListView, strColEven As String, strColOdd As String)
Dim strNumber1 As String
Dim strNumber2 As String
Dim i As Long
For i = 1 To LvwName.ListItems.Count Step 1
strNumber1 = i
strNumber2 = Mid(strNumber1, Len(strNumber1))
If strNumber2 = "0" Or strNumber2 = "2" Or strNumber2 = "4" Or strNumber2 = "6" Or strNumber2 = "8" Then
LvwName.ListItems.Item(i).ForeColor = strColEven
Else
LvwName.ListItems.Item(i).ForeColor = strColOdd
End If
Next i
End Function You could put that function into a module or something then put this somewhere in your code like after you add some items or load a list
Code:
ChangeColors ListView, &HFF&, &HFF0000
then your listview will look like this
Example1 (Color Will Be Blue)
Example2 (Color Will Be Red)
Example3 (Color Will Be Blue)
Example4 (Color Will Be Red)
Example5 (Color Will Be Blue)
Example6 (Color Will Be Red)