Results 1 to 6 of 6

Thread: ListView Population... [resolved]

Threaded View

  1. #1

    Thread Starter
    Frenzied Member thegreatone's Avatar
    Join Date
    Aug 2003
    Location
    Oslo, Norway. Mhz:4800 x12
    Posts
    1,333

    Resolved ListView Population... [resolved]

    Ok, the following code, in theory should work... but in fact it doesn't what is wrong ?

    VB Code:
    1. Private Sub Command1_Click()
    2. CD.Filter = "Text Files (*.txt)|*.txt"
    3. Dim strData As String
    4. Dim astrDataItem() As String
    5. On Error Resume Next
    6. 'Open text file and split by :'s
    7.     CD.ShowOpen
    8.         If CD.FileName = "" Then
    9.         Else:
    10.         Open CD.FileName For Input As #1
    11.         Do Until EOF(1)
    12.         Line Input #1, strData
    13.             astrDataItem = Split(strData, ":")
    14.             ListView1.ListItems.Add 1, , astrDataItem(0)
    15.             ListView1.ListItems.Add 2, , astrDataItem(1)
    16.         Loop
    17.     Close #1
    18. End If
    19. End Sub

    CD = CommonDialog control

    Any Help would be greatly appreciated,
    Last edited by thegreatone; Mar 30th, 2005 at 12:42 PM.
    Zeegnahtuer?

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