Dim selDrive As Object Dim drvLetter As String For Each selDrive In chkdLstBoxDrives.CheckedItems drvLetter = selDrive.ToString drvLetter = Microsoft.VisualBasic.Left(drvLetter, 3) chkdLstBoxDrives.Hide() lstBoxFiles.Show() Dim fileNames = My.Computer.FileSystem.GetFiles(drvLetter, FileIO.SearchOption.SearchAllSubDirectories, "*.mp3") <=== error occurs here For Each fileName As String In fileNames lstBoxFiles.Items.Add(fileName) Next Next
Try..Catch
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)