Function FillList(LV As ListView, strPrefix As String) As Boolean
Dim intTotCount As Integer
Dim intCount1 As Integer
Dim intCount2 As Integer
Dim colNew As ColumnHeader
Dim NewLine As ListItem
Dim kk As Integer
LV.ListItems.Clear
LV.ColumnHeaders.Clear
For intCount1 = 0 To 3
Set colNew = LV.ColumnHeaders.Add(, , "column" & intCount1)
Next intCount1
LV.View = 3 ' Set View property to 'Report'.
For intCount1 = 1 To 10
If (intCount1 = 5) Then kk = 2 Else kk = 1
Set NewLine = LV.ListItems.Add(, strPrefix & intCount1 & "_Key", strPrefix & intCount1, 1, kk)
For intCount2 = 1 To 3
NewLine.SubItems(intCount2) = "subfrom1" & intCount2
Next intCount2
If (intCount1 = 2) Then
NewLine.ForeColor = 255
NewLine.Ghosted = True
End If
Next intCount1
End Function