• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Pull information on multiple path

Abhijeet

Active Member
Hi

I have macro i want to pull different paths in the same macro so please tell me how to alter this macro

I want to pull particular path file names information so current macro provide info of one particular path i want if multiple then how to do

Please tell me
 

Attachments

  • File_Manager.xlsm
    233.9 KB · Views: 12
I tried for single path please tell me multiple path how to do this

Code:
Sub Test()
    Dim strPath As String
    Dim sdir As String
    Dim i As Integer
    strPath = ThisWorkbook.Sheets("Sheet1").Range("B1").Value & "\"
    sdir = Dir$(strPath, vbNormal)
    i = 2
    Do Until Len(sdir) = 0
   
        Sheet2.Range("A" & i).Value = sdir
        i = i + 1
        sdir = Dir$
    Loop
    MsgBox "Done"
 
End Sub
 

One path by one path !

So just copy code for each path or use a For Each loop on a path array …
 
I tried this but problem is 1st path file names mention in sheet 2 then go to next path then that will be overwrite file names so please tell me for this part what need to change

i = 2
DoUntil Len(sdir) = 0

Sheet2.Range("A" & i).Value = sdir
i = i + 1
sdir = Dir$
Loop
 
Hi

actually i am confused but please tell me here need to check bank cell or what

if this wrong then please tell me
 
Back
Top