Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Listview problem
Message
From
05/05/2005 23:53:02
Randy Riegel
Zimish Contracting
Ohio, United States
 
 
To
All
General information
Forum:
Visual Basic
Category:
ActiveX controls
Title:
Listview problem
Miscellaneous
Thread ID:
01011493
Message ID:
01011493
Views:
68
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
Reply
Map
View

Click here to load this message in the networking platform