I am having trouble modifying part of a macro I found. The macro use internet explorer to download all HTML tables found on a specific website. It stores the tables information it in an array and then paste that array in a worksheet.The macro work fines but when I recopied the macro to download a 2nd website (I use the exact same one for the example below) I received the following error:
“Runtime-error '9'”: Subscript out of range
when running this line of code a 2nd time:
myarray(intRow, intCol) = objTD.innerText
From what I found research this, it probably have to do with the array needed to be reset? There is a REDIM before creating the 2nd array for the 2nd website but it still trigger an error. I tried ERASE MY ARRAY but that did not help as well. Complete code is below. Any help would be appreciated, thank you for your time!
Bookmarks