VBA to fetch html URL from webpage
<p>I have created Macro which can read all the HTML of provided URL, however I want to fetch all the url from that HTML.</p>

<pre><code>    Sub GetHTML_Click()

Dim ie As InternetExplorer
Dim html As HTMLDocument
Dim j As Integer
Set ie = New InternetExplorer
ie.Visible = True

url = Cells(1, 2)

ie.navigate url

Do While ie.READYSTATE &lt;&gt; READYSTATE_COMPLETE
Application.StatusBar = "Trying to go to website ..."
Loop
Application.StatusBar = " "
Set html = ie.document
'Dim htmltext As Collection
Dim htmltext As String
htmltext = html.DocumentElement.innerHTML
'Need to add iURL
Dim htmlurl As IHTMLElement
For Each htmlurl In hmtltext
iurl = htmlurl.toString
Cells(j, 1).Value = CLng(iurl)
j = j + 1
Next

End Sub
</code></pre>

<p>I tried to code this to fetch the URLs however its giving "Object Required error"</p>

<p>can anyone please help to modify this macro which will help me to fetch all the URL from HTML page.</p>

<p>I am using www.mini.in website for testing.</p>

<p>Mayur.</p>