Hi,
I've spent the last couple of days searching to try and find a solution to this but really having trouble getting my code to work. I'm trying to pull in the below value:
Its the number 4 that I need to pull in. I've managed to get the code working to log into the website and navigate to this page but having real trouble pulling in the correct rank (4 in this case)
I've gotten this far but it fails on this line... I cant really go any further than this:
Rank = ie.Document.getElementById("app_rankings")
I'm assuming I need to work my way through the div tags using getElementbyClassName or getElementbyID
app_rankings->complex-table-region-main etc...
Any ideas?
I've spent the last couple of days searching to try and find a solution to this but really having trouble getting my code to work. I'm trying to pull in the below value:

Its the number 4 that I need to pull in. I've managed to get the code working to log into the website and navigate to this page but having real trouble pulling in the correct rank (4 in this case)
I've gotten this far but it fails on this line... I cant really go any further than this:
Rank = ie.Document.getElementById("app_rankings")
I'm assuming I need to work my way through the div tags using getElementbyClassName or getElementbyID
app_rankings->complex-table-region-main etc...
Any ideas?
Code:
Sub Test() Dim ie As Object
Dim Rank As Object
Set ie = CreateObject("InternetExplorer.application")
ie.Visible = True
ie.Navigate ("http://appannie.com/account/logout/")
Do
If ie.ReadyState = 4 Then
Exit Do
Else
End If
Loop
ie.Navigate ("http://appannie.com/account/login/")
Do
If ie.ReadyState = 4 Then
Exit Do
Else
End If
Loop
ie.Document.getElementById("username").Value = "*****"
ie.Document.getElementById("password").Value = "*****"
ie.Document.getElementById("login_submit_button").Click
prevCOB = Format(Application.WorksheetFunction.WorkDay(Date, -1), "YYYY-MM-DD")
Do
If ie.ReadyState = 4 Then
Exit Do
Else
End If
Loop
ie.Navigate ("http://www.appannie.com/apps/ios/app/465712788/app-ranking/#device=iphone&daily=" & prevCOB & "&type=ranks")
[B] Rank = ie.Document.getElementById("app_rankings")[/B]
Rank = Rank.getElementsByClassName("complex-table")
End Sub
Last edited: