Listing 2: Using the collection.
Private Sub btnSearch_Click() Dim fs As New RECLS_COMLib.FileSearch Dim srch As Object . . . // get search params from dialog controls Set srch = fs.Search(searchRoot, pattern, flags) lstFiles.Clear // Empty list box For Each entry In srch lstFiles.AddItem (entry) // Add entry to lbox . . . // other stuff Next