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

Popular posts from this blog

searchKeyword not working in AngularJS filter -

sequelize.js - Sequelize: sort by enum cases -

user interface - how to replace an ongoing process of image capture from another process call over the same ImageLabel in python's GUI TKinter -