Ok, the following code, in theory should work... but in fact it doesn't what is wrong ?
VB Code:
Private Sub Command1_Click() CD.Filter = "Text Files (*.txt)|*.txt" Dim strData As String Dim astrDataItem() As String On Error Resume Next 'Open text file and split by :'s CD.ShowOpen If CD.FileName = "" Then Else: Open CD.FileName For Input As #1 Do Until EOF(1) Line Input #1, strData astrDataItem = Split(strData, ":") ListView1.ListItems.Add 1, , astrDataItem(0) ListView1.ListItems.Add 2, , astrDataItem(1) Loop Close #1 End If End Sub
CD = CommonDialog control
Any Help would be greatly appreciated,




Reply With Quote