Private Sub ComboBox2_Change()
Dim Counter As Integer
Dim index As Integer
index = ComboBox2.ListIndex
Select Case index
Case Is = 0
'For every row in the current selection...
For Counter = 1 To Selection.Rows.Count
'If the row is an odd number (within the selection)...
If Counter Mod 3 = 1 Then
'Set the pattern to Lt Grey.
Selection.Rows(Counter).Interior.Color = RGB(192, 192, 192)
End If
Next
Case Is = 1
'For every row in the current selection...
For Counter = 1 To Selection.Rows.Count
'If the row is an odd number (within the selection)...
If Counter Mod 3 = 1 Then
'Set the pattern to Lt Green.
Selection.Rows(Counter).Interior.Color = RGB(204, 255, 204)
End If
Next
Case Is = 2
'For every row in the current selection...
For Counter = 1 To Selection.Rows.Count
'If the row is an odd number (within the selection)...
If Counter Mod 3 = 1 Then
'Set the pattern to Lt Yellow.
Selection.Rows(Counter).Interior.Color = RGB(255, 255, 153)
End If
Next
Case Is = 3
'For every row in the current selection...
For Counter = 1 To Selection.Rows.Count
'If the row is an odd number (within the selection)...
If Counter Mod 3 = 1 Then
'Set the pattern to Lt Blue.
Selection.Rows(Counter).Interior.Color = RGB(204, 255, 255)
End If
Next
Case Is = 4
'For every row in the current selection...
For Counter = 1 To Selection.Rows.Count
'If the row is an odd number (within the selection)...
If Counter Mod 3 = 1 Then
'Set the pattern to Lt Tan.
Selection.Rows(Counter).Interior.Color = RGB(255, 204, 153)
End If
Next
Case Is = 5
'For every row in the current selection...
For Counter = 1 To Selection.Rows.Count
'If the row is an odd number (within the selection)...
If Counter Mod 3 = 1 Then
'Set the pattern to Lt Red.
Selection.Rows(Counter).Interior.Color = RGB(255, 220, 204)
End If
Next
Case Is = 6
'For every row in the current selection...
For Counter = 1 To Selection.Rows.Count
'If the row is an odd number (within the selection)...
If Counter Mod 3 = 1 Then
'Set the pattern to White.
Selection.Rows(Counter).Interior.Color = RGB(255, 255, 255)
End If
Next
End Select
End Sub