Hi all,
Another day, another VBA problem for me to solve ;-) I'm trying to write VBA code to
* Import multiple HTM(L) files from a selectable folder (file picker)
* The content of all files (raw content) should be imported to a specific spreadsheet ("RawData") from row 2 down
* The file names of the HTM(L)s should be in column A (and imported without the file extensions, i.e. .htm(L)), the content in column B
* So each file should be imported in one row (across the two columns mentioned) until all selected files have been imported
* Every time I (re-)import new HTML file, the two columns A+B (everything from row 2 down) should be cleared first
I found several VBAs that are supposed to import multiple HTML files, however, they all don't seem to do exactly what I would want (e.g. no file picker..not importing the file name...not importing to the same worksheet etc.) or simply aren't working.
One example is this script, however, I can't even get it to work (get a 'path not found' error on line "Set objFolder = objFSO.GetFolder(ThisWorkbook.Path)"?).
It really doesn't have to be based on the script above (not even sure what all of the .TextXYZ lines are doing!), but sadly haven't found anything that comes close to what I need.
Hoping anyone has a script they could share or can help with this request?
Two example HTML files and a .xlsm with expected results attached...
Appreciate any help
Thank you!
Bookmarks