This should be neater. Do away with the lvw.ForeColor = FColor
Code:'Private Sub ResetListViewForeColor(lvw As VBCCR14.ListView, FColor As Long) Private Sub ResetListViewForeColor(lvw As ListView, FColor As Long) Dim i As Long Dim j As Long lvw.Visible = False For i = 1 To lvw.ListItems.Count lvw.ListItems(i).ForeColor = FColor For j = 1 To lvw.ColumnHeaders.Count - 1 lvw.ListItems(i).ListSubItems(j).ForeColor = FColor Next Next lvw.Visible = True End Sub




Reply With Quote