I have to import images to an array and then insert these images to excel worksheet.
I have a code which gets the name of all files into an array and insert one by one. but the order is jumbled. I used Dir() method
Do While sFile <> ""
aFileNames(nCounter) = sFile
sFile = Dir
nCounter = nCounter + 1
If nCounter > UBound(aFileNames) Then
ReDim Preserve aFileNames(UBound(aFileNames) + 255)
End If
Loop
I need to get the array of file names in date modified (ascending).so that first image which was first saved will be inserted first