Mantiza
07-31-2002, 05:29 PM
I'm trying to list the files from a dir in a listview box. I need two columns ("original file name" and "new file name"). the code i have is:
Private Sub file1_click()
For s = 0 To File1.ListCount - 1
ListBoxOldName = File1.Path & "\" & File1.List(s)
ListBoxNewName = Dir1.Path & "\" & Format$(FileDateTime(ListBoxOldName), "yyyy" + "-" + "MM" + "-" + "dd" + " " + "hh" + " " + "mm" + " " + "ss") & ".jpg" 'error 53
ListView1.ListBoxOldName.Add , , Adodc1.Recordset.Fields("OldName").Value
ListView1.ListBoxNewName.Add , , Adodc1.Recordset.Fields("NewName").Value
Next s
End Sub
...When i run the program i get the error "method or data member not found" I am not sure what i am doing wrong. Do I have to set the viewlistbox to multicolumn in the properties?
Private Sub file1_click()
For s = 0 To File1.ListCount - 1
ListBoxOldName = File1.Path & "\" & File1.List(s)
ListBoxNewName = Dir1.Path & "\" & Format$(FileDateTime(ListBoxOldName), "yyyy" + "-" + "MM" + "-" + "dd" + " " + "hh" + " " + "mm" + " " + "ss") & ".jpg" 'error 53
ListView1.ListBoxOldName.Add , , Adodc1.Recordset.Fields("OldName").Value
ListView1.ListBoxNewName.Add , , Adodc1.Recordset.Fields("NewName").Value
Next s
End Sub
...When i run the program i get the error "method or data member not found" I am not sure what i am doing wrong. Do I have to set the viewlistbox to multicolumn in the properties?