Can't Get HTML Element by TagName in VB

7331

New Member
I am trying to get elements by tag names in my VB code like I used to in VBA, but cannot figure out how. I open up a new browser window, yet from then on the code gets stuck. \[code\]Public ie As New SHDocVw.InternetExplorerPrivate Sub TEST(sender As Object, e As EventArgs) Handles MyBase.Load Dim Keyword As Long ie = New SHDocVw.InternetExplorer ie.Visible = True ie.Navigate("http://google.com/") Do Until ie.ReadyState = SHDocVw.tagREADYSTATE.READYSTATE_COMPLETE Application.DoEvents() Loop Dim Doc As HtmlDocument Doc = ie.Document Keyword = Doc.GetElementsByTagName("td")(8).InnerText MsgBox(Keyword)End Sub\[/code\]
 
Back
Top