hi, everybody
i have sheet1 contains data and contains column d colored value i would show colored value in listview
hi, everybody
i have sheet1 contains data and contains column d colored value i would show colored value in listview
here is a snippet of code to get you started.
there will need to be a bit more logic added to set up the colours you want
'Count number of columns in source range
colCount = rngData.Columns.Count
'Now we fill our ListView
For i = 2 To rowCount
Set listItem = Me.ListView1.ListItems.Add(Text:=rngData(i, 1).Value)
For j = 2 To colCount
listItem.ListSubItems.Add Text:=rngData(i, j).Value
If j = 4 Then
listItem.ListSubItems.Item(3).ForeColor = vbRed
End If
I have added the xl with the code in it.
From the macro editor select the form then right mouse click on it to show the code