Pick data from web page (no query)
You are return nothing because it didn' tfind an ID= matching your criteria.
Try one of my two instruction and you will see it will return a value
Set last = IE.document.getelementsbytagname("Form")
'or
Set last = IE.document.getElementByID("objInloggenScreen")
Try this code which will get all the ID's. Then in the Internet Explorer
view the Source code from the menu VIEW - SOURCE. You'll see the items in
column A on the spreadsheet will match the ID= in the source
Sub Getquotes2()
Set IE = CreateObject("InternetExplorer.Application")
IE.Visible = True
URL = "https://www.binck.com/gekko/default.aspx?" & _
"Redir=/gekko/common/researchennieuws/fondsdetails/overzicht.aspx?binc=1068754"
'get web page
IE.Navigate2 URL
Do While IE.readyState < 4
DoEvents
Loop
Set last = IE.document.all
RowCount = 1
For Each itm In IE.document.all
If itm.ID < "" Then
With ActiveSheet
.Range("A" & RowCount) = itm.ID
RowCount = RowCount + 1
End With
End If
Next itm
End Sub
"rik" wrote:
I'm sorry, but i'm not with you anymore :
"objInloggenScreen" ? Does this mean : the ID that i found in the source of
the web page (1068754|LAST, see pasted source in my first post)
add a Watch : i think i could do this although i couldn't find the plus (+)
you mentioned. Running with break point and watch gives me :
Watch : : last : Nothing : Variant/Object : Module1.Getquotes
so value = nothing
on website it is = 350,30
I also do not understand your sentence "When referencing these objects you
will use Last.innertext"
Basically, what i want to do is putting this value (350,30) into cell A1.
What do i do wrong ?
|