Hi,
How would I loop through a list view control to add multiple items?
This is the code I use for a single items but I can't get it working in a loop.
vb Code:
'Retrieve mail from inbox Dim iMsgID As Integer Dim COLH As Integer 'Dim mSubitem As ListItems For COLH = 0 To 2 If frmMain.LstNewMail.ListItems.Count = 0 Then 'For Each mSubitem In frmMain.LstNewMail.ListItems Set itmM = frmMain.LstNewMail.ListItems.Add(, , Pop3.Messages(iMsgID).From) COLH = COLH + 1 itmM.SubItems(COLH) = Pop3.Messages(iMsgID).Subject COLH = COLH + 1 itmM.SubItems(COLH) = Pop3.Messages(iMsgID).Date ' Next mSubitem End If Next COLH
The code I have commented out was my attempt to insert items using a loop.
Thanks,
Nightwalker




Reply With Quote