now i need to add icon in subitem ITMX.SubItems(1) = STRDBROWS(3, K) from imagelist1Private Sub VEDI_SCORTE()
Dim N As Integer, N1 As Integer
Set RS = New ADODB.Recordset
RS.CursorLocation = adUseClient
RS.Open SQL, CON, adOpenForwardOnly, adLockReadOnly
If Not RS.EOF Then
RS.MoveFirst
RS.Sort = ("REP, IDTIP")
Erase STRDBROWS()
STRDBROWS = RS.GetRows()
RS.Close
Set RS = Nothing
With Me.LVSCORTE
LockWindowUpdate Me.hwnd
.ListItems.Clear
For K = 0 To UBound(STRDBROWS, 2)
If STRDBROWS(9, K) > 0.3 * STRDBROWS(5, K) Then
ICO = 2
N = N + 1
Else
ICO = 1
N1 = N1 + 1
End If
Set ITMX = .ListItems.Add(, , STRDBROWS(8, K), ICO)
ITMX.SmallIcon = ICO
ITMX.SubItems(1) = STRDBROWS(3, K)
ITMX.SubItems(2) = STRDBROWS(0, K)
ITMX.SubItems(3) = STRDBROWS(1, K)
ITMX.SubItems(4) = Format$(STRDBROWS(5, K), "#,##0")
ITMX.SubItems(5) = Format$(STRDBROWS(6, K), "#,##0")
ITMX.SubItems(6) = Format$(STRDBROWS(9, K), "#,##0")
ITMX.SubItems(7) = Format$(Round((STRDBROWS(9, K) / STRDBROWS(5, K)) * 100, 2), "0.00")
ITMX.SubItems(8) = STRDBROWS(7, K)
Next K
Me.LNR5.Caption = Format$(.ListItems.Count, "#,##0")
LockWindowUpdate 0&
End With
Me.LN.Caption = Format$(N1, "#,##0")
Me.LN1.Caption = Format$(N, "#,##0")
End If
End Sub
possible to use two imagelist?
note:
important for me to have two different imagelist