I have been trying to extract data from a alt="" string, but i keep getting either a error 91 or 428.
The website is: http://nordeagws.gws.fcnws.com/fs_Ov...=1,2,3,4,5,6,7
and the data is the morningstar rating, which currently is 4. The problem is that this is not expressed as text but as an image.
The line is: <img alt="4" src="http://www.excelforum.com/images/nordeagws/ico_ms_4.png"> (I have attached a picture of the website code for navigation).
I want to extract the "4", but have falied for hours with a lot of different approaches..
I code is currently as following:
Sub stock_rating()
Dim IE As Object
' Create InternetExplorer Object
Set IE = CreateObject("InternetExplorer.Application")
' View IE (True/false)
IE.Visible = False
IE.navigate "http://nordeagws.gws.fcnws.com/fs_Oversigt.html?isin=DK0010265859&clientid=dknb2&shelves=DKNB2,DKNB2 DFP2,DKNB2 PBPM¤cy=DKK&culture=da-DK&CategoryFilter:taborder=1,2,3,4,5,6,7"
' Statusbar
Application.StatusBar = "Loading, Please wait..."
' Wait while IE loading...
Do While IE.Busy
Application.Wait DateAdd("s", 1, Now)
Loop
Application.Wait (Now + TimeValue("00:00:01"))
Debug.Print IE.document.getelementbyid("BasicData2").getElementsByTagName("img").getAttribute("alt").Text
End Sub
Do you have any ideas as to what I'm doing wrong?
Thanks.
Bookmarks