Hi. What would be the macro to look in the downloads folder for all files that start with the partial name "Additional info looker Standard Unlimited*.csv" and then open the "most recent one"?
The code below always opens the oldest created(downloaded) file if there are 2 or more with the same partial name, instead of the newest one. Any way to make this reverse?
Thank you
The code below always opens the oldest created(downloaded) file if there are 2 or more with the same partial name, instead of the newest one. Any way to make this reverse?
Thank you
VBA Code:
Sub YLoadCSV_AdditionalInfo()
Dim CSV_FileToOpen As String
CSV_FileToOpen = Dir(Environ("USERPROFILE") & "\Downloads\" & _
"Additional info looker Standard Unlimited*.csv") ' Save found CSV file to CSV_FileToOpen
Workbooks.Open Filename:=Environ("USERPROFILE") & "\Downloads\" & CSV_FileToOpen ' Open the CSV file
End Sub