This does it:
Code:Private Sub Command1_Click() Dim NameFile As String, SubDir As String SubDir = CurDir$ & "\*.*" ' Change CurDir to whatever directory is being searched NameFile = Dir$(SubDir) Do While NameFile <> vbNullString List1.AddItem NameFile NameFile = Dir$ Loop End Sub




Reply With Quote