To populate the listbox:
Sub snb() With Application.FileDialog(msoFileDialogFolderPicker) If .Show = -1 Then ListBox1.List = Split(CreateObject("wscript.shell").exec("cmd /c dir " & .SelectedItems(1) & "\*.txt /b").StdOut.readall, vbCrLf) End With End Sub