I have an Excel file, and in the same folder I have a folder with CSV files I want to include. Using the From Folder query thing, the first step will give the following query:
= Folder.Files("D:\OneDrive\Documents\Health\Concept2")
Now, this path will not be the same on my laptop for example, but the Excel file will always be in the Health directory...
I get an error if I try to just pass a relative path to Folder.Files
, but is there a way to work around this? A fancy function? Some variable or thing I don't know about because I'm a total newb in this area?
Attempt 1
= Folder.Files(".\Concept2")
= Folder.Files("Concept2")
❌DataFormat.Error: The supplied folder path must be a valid absolute path.
Attempt 2
= Folder.Files(Activeworkbook.Path & "\Concept2")
❌ Expression.Error: The name 'Activeworkbook.Path' wasn't recognized. Make sure it's spelled correctly.