Ett exempel Martin som kanske hjälper dig på väg.Stega genom LView
Stegar genom lvw och skriver ut till en textfil.
<code>
Dim mItem As Variant
Dim itemCount As Long
Dim subItemCount As Long
Dim itemStr As String
Dim i As Long, j As Long, Fnum As Long
itemCount = lvw.ListItems.Count
subItemCount = lvw.ColumnHeaders.Count
Fnum = FreeFile
Open App.Path & "\LviewTest.txt" For Output As #Fnum
For i = 1 To itemCount
Set mItem = lvw.ListItems.Item(i)
itemStr = mItem.Text
For j = 1 To subItemCount - 1
itemStr = itemStr & " " & mItem.SubItems(j)
Next ' j
Print #Fnum, itemStr
Next 'i
Close #Fnum
</code>