I am trying to get data from internet to Excel spreadsheet. Namely, I want the names of the AP Top 25 NCAAF teams from past 12 years, for all 17 weeks of the season (including final rankings). My code is based off this tutorial: https://www.youtube.com/watch?v=7sZRcaaAVbg
I'm getting the error at the line:
SchoolNames(iYear, iWeek, iRank) = Trim(Doc.getElementsByTagName("school")(iRank - 1).innerText)
Here's my code:
Option Explicit
Sub Data_Collection()
Application.ScreenUpdating = False
Dim iYear As Integer
Dim iWeek As Integer
Dim IE As New InternetExplorer
Dim sYear As String
Dim sWeek As String
Dim SchoolNames(12, 17, 25) As String
Dim Doc As HTMLDocument
Dim iRank As Integer
For iYear = 2002 To 2013
sYear = CStr(iYear)
For iWeek = 1 To 17
If iWeek = 17 Then
sWeek = "1/seasontype/3"
Else
sWeek = CStr(iWeek)
End If
IE.Visible = False
IE.navigate "http://espn.go.com/college-football/rankings/_/poll/1/year/" & sYear & "/week/" & sWeek
Do
DoEvents
Loop Until IE.readyState = READYSTATE_COMPLETE
Set Doc = IE.Document
For iRank = 1 To 25
SchoolNames(iYear, iWeek, iRank) = Trim(Doc.getElementsByTagName("school")(iRank - 1).innerText)
Next iRank
Next iWeek
Next iYear
End Sub
Additionally, I'm not sure even after I fix the Runtime 91 error that I am passing the right stuff into the .getElementsByTagName(). Any suggestions?

in your project.
a,divand etc