Function SetListViewValue(ByRef oLV As ListView, ByVal lRow As Long, lCol As Long, vValue As Variant) As Boolean
' oLV : la ListView
' lRow : numéro de ligne. commence 0 = header
' lCol : numéro de colonne. commence à 1
SetListViewValue = False
With oLV
If (lRow >= 0) And (lCol >= 1) Then
If (lRow <= .ListItems.Count) And (lCol <= .ColumnHeaders.Count) Then
If lRow = 0 Then 'header
.ColumnHeaders.Item(lCol).Text = CStr(vValue)
ElseIf lCol = 1 Then '1ère colonne
.ListItems(lRow).Text = CStr(vValue)
Else 'les autres colonnes
.ListItems(lRow).SubItems(lCol - 1) = CStr(vValue)
End If
SetListViewValue = True
End If
End If
End With
End Function