Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Codings: Sub navigateurl() Dim number As Integer Dim URL As String Dim propertyname As Object

URL = "http://keystonemanagement.com/apartments/me"

Set IE = CreateObject("InternetExplorer.Application") IE.Visible = True IE.Navigate URL

Do While IE.ReadyState <> 4 Doevents Loop

Set propertyname = IE.document.getElementsByTagName("h4") number = propertyname.Length For i = 0 To number - 1

ThisComponent.Sheets(0).getCellbyPosition(i, 0) = propertyname(i).innerText ThisComponent.Sheets(0).getCellbyPosition(i,0) = propertyname(i).getElementsByTagName("a")(0).href

Next i

End Sub

The error came in this step "Set propertyname = IE.document.getElementsByTagName("h4")"