• 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.

Use dir$ to read specific file types

Uri

New Member
Good day!
Code:
Let strName = Dir$(strDir & "*.jpg")
    Do While strName <> vbNullString
        Let i = i + 1
        Let strArr(i, 1) = strDir & strName
        Let strName = Dir$()
    Loop
Works fine for retrieving all *.jpg filenames.
How can I retrieve in one command also the *.webp names? (*.jpg OR *.webp)
Many thanks!
Uri

MOD Edit: Added Code Tags to VBA Code.
 
Hi,​
according to forum rules do not forget to use the code tags via the 3 dots icon.​
After your initial loop you must add another Dir loop for .webp files …​
 
Back
Top