html - Why is this NOT producing a type mismatch error in VBA? -
i'm declaring variable htmlanchorelement object reserved html "a" tags. setting variable equal paragraph tag should work htmlparaelement objects. somehow variable becomes paraelement object despite being declared otherwise.
option explicit 'turn on references microsoft internet controls 'and microsoft html object libraries before running sub qstn() dim ie new internetexplorer dim el htmlanchorelement ie.navigate "www.youtube.com" ie.visible = true until ie.readystate = 4: loop set el = ie.document.getelementsbytagname("p")(0) msgbox typename(el) end sub
Comments
Post a Comment