• The forum (and all other resources in Chandoo.org) will be under maintenance and will be unavailable for a maximum of two hours on the first week of October 2023. The exact date, time and duration of the maintenance are subject to change. We regret the inconvience it may cause.
  • 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.

using multiple image extensions

Open at least the VBE Immediate window !​
Or mod the code to list to a worksheet …​
 
I tryed in the immedate window, when i saved the file code and window was gone.
Worksheet test is my bad, it has to be Sheet 1
Because nothing works and I don't get anywere I am getting nervous..
In the real file I don't make these mistakes naming the sheet wrong
 
As it should work once the Path variable is correct which seems not the case in your actual code …​
 
According to your attachment error found : your logic !​
As in column M the filenames already have an extension so no need to loop on an extensions array …​
So according to your initial post the question is why do you add an extension like ".jpg" to a filename which already has an extension ?‼​
 
No issue on my side once the Path is correct / updated and with the appropriate logic according to column M content …​
 
So weird your attachment does not well reflect your workbook !​
So I won't waste more time without the necessary any VBA forum expects for in the initial post …​
 
My workbook reflect exact what I want. Simple as bonjour.
Photos's in a folder, Names in column M (with or without extention, doesn't matter I can change that)and photo's should be added in column N
I don't think you can figure it out yourself,otherwise it is a small matter of posting a small working example.
 
Can you post a working example with the coorect phot names and path,I drives me nuts.
According to your post #30 attachment - so obviously with column M filenames with extensions :rolleyes: - my checking files procedure updated​
to paste only to the Blad1 (test) worksheet module :​
Code:
Sub Check1()
    Dim P$, V, F$, L&
        P = ThisWorkbook.Path & "\Test\"
    For Each V In [M1].CurrentRegion.Columns(1).Value
        F = Dir$(P & V):  If F > "" Then L = L + 1: Debug.Print P & F
    Next
        Debug.Print "Total :"; L
End Sub
All files found …​
 
This workbook path ?
So if the folder is "C\Test\" than the file has to be on the C, the file has to go in my documents.
 
Back
Top