Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
Thanks for the reply, I will try it out but basically, there can be no userintervention except to say "go". See my reponse to Bob Phillips. regards mark -----Original Message----- Hi Mark Application.FileSearch will also do the job but partially: With Application.FileSearch ..NewSearch ..LookIn = "E:\Customers" ..SearchSubFolders = True ..FileType = msoFileTypeAllFiles 'see choice in list If .Execute() 0 Then Worksheets("Sheet1").Cells(1, 1).Value = "File Name" For i = 2 To .FoundFiles.Count Worksheets("Sheet1").Cells(i, 1).Value = .FoundFiles (i) Next i Else MsgBox "No files where found in the specified folder", vbInformation, "No Match" End If End With HTH Cordially Pascal "Mark" a écrit dans le message de ... I want to list (from a known directory eg: E:\Customers) the folder names (that branch off the Customers folder) into sheet1 and filenames in each folder into sheet2. Can this be done with VBA or do I need to resort to an API call? If anyone knows or has an idea, let me know here and at my email: Alternatively, In vb6 there is a control that lists all the files in a given directory, in a listbox. Is there a similar control in excel? Could I use this control in excel? I've got it but haven't tried it yet. regards Mark . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Pulling pdf files from general folder to specific folder | Excel Discussion (Misc queries) | |||
how can i change my default working folder to a networked folder? | Excel Discussion (Misc queries) | |||
How to decide folder-depth or How to select more folders/subfolders (folder-tree) ? | Excel Discussion (Misc queries) | |||
Need code to save file to new folder, erase from old folder | Excel Discussion (Misc queries) | |||
how can I specific a folder with wildcard criteria and excel will import all the correct files in that folder? | Excel Discussion (Misc queries) |