Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Listview problem
Message
De
05/05/2005 23:53:02
Randy Riegel
Zimish Contracting
Ohio, États-Unis
 
 
À
Tous
Information générale
Forum:
Visual Basic
Catégorie:
Contrôles ActiveX
Titre:
Listview problem
Divers
Thread ID:
01011493
Message ID:
01011493
Vues:
69
I've have the following code. I'm getting a Type Mismatch error on the line in the for loop trying to add the filename to my listview. What am I doing wrong?
Private Const MRD_SOURCE = "d:\data\"
Private Const REP_SOURCE = "d:\output\"
Private Const MRD_DEST = "d:\mrd_files\"
Private Const REP_DEST = "d:\rep_files\"

Private Sub Form_Load()
    Call FillListView
End Sub


Private Sub FillListView()
    Dim fso As New FileSystemObject
    Dim LItem As ListItems
    Dim SourceFolder, DestFolder As Scripting.Folder
    Dim FileItem As Scripting.File
    Dim strFilename As String
    
    Set SourceFolder = fso.GetFolder(REP_SOURCE)
    For Each FileItem In SourceFolder.Files
        Set LItem = lvwFiles.ListItems.Add(, , FileItem.Name)  <--- ERROR
    Next
End Sub
Répondre
Fil
Voir

Click here to load this message in the networking platform