Results 1 to 2 of 2

Thread: saving stuff in listviews, URGENT!

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2000
    Posts
    1

    Post

    does anyone know how to save the data underneath 'all' the column headers in report view to an external data file?
    I want the data in the file to look like:
    "title","author" etc

  2. #2
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649

    Post

    Here is an example that prints all the data. You can easily chage it so it prints the sText to a file instead:

    Dim itmX As ListItem
    Dim i%, iSubItemsCount%
    Dim sText As String

    For Each itmX In ListView1.ListItems()
    sText = itmX.Text
    iSubItemsCount = ListView1.ColumnHeaders.Count
    For i = 1 To iSubItemsCount - 1
    sText = sText & ", " & itmX.SubItems(i)
    Next
    Printer.Print sText
    Next
    Printer.EndDoc

    Good luck!

    ------------------
    Joacim Andersson
    [email protected]
    [email protected]
    www.YellowBlazer.com



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width