|  |  | 
              
              | 
                  | Title | List the links available at a URL | 
|---|
 | Keywords | links, URL, Web | 
|---|
 | Categories | Utilities, Controls, Internet | 
|---|
 |  | 
 |  | Open the URL with the WebBrowser control. Use its Document object's links collection to list the links. 
Using a similar technique you can look at the Document object's other properties.
               |  | 
 |  
                | Private Sub cmdListLinks_Click()
Dim i As Integer
    cmdListLinks.Enabled = False
    Screen.MousePointer = vbHourglass
    DoEvents
    ' Open the URL.
    wbrSource.Navigate txtURL.Text
    ' Wait until the document is loaded.
    Do While wbrSource.ReadyState <> READYSTATE_COMPLETE
        DoEvents
    Loop
    ' List the links available.
    lstLinks.Clear
    For i = 0 To wbrSource.Document.links.length - 1
        lstLinks.AddItem wbrSource.Document.links(i).href
    Next i
    ' Reenable the button.
    cmdListLinks.Enabled = True
    Screen.MousePointer = vbDefault
End Sub |  |  |  |   |  |  |  |  |