Public Sub SaveData(mPath As String, LVW As ListView, useHeaders As Boolean)
Dim FSO As FileSystemObject, TS As TextStream, i As Integer, j As Long, line As String
Set FSO = New FileSystemObject
Set TS = FSO.OpenTextFile(mPath, ForWriting, True)
For j = 1 To LVW.ListItems.Count
line = LVW.ListItems(j).Text & ":"
For i = 1 To LVW.ListItems(j).ListSubItems.Count
line = line & LVW.ListItems(j).ListSubItems(i).Text & ":"
Next i
TS.WriteLine Left(line, Len(line) - 1)
Next j
TS.Close
Set TS = Nothing
Set FSO = Nothing
End Sub
|