This seems to be working....
Code:
Private Sub Command0_Click()
Dim strURL As String
strURL = "C:\Test\Internet\Sample.htm"
Dim objIE As InternetExplorer
Dim htmlDoc As HTMLDocument
Dim LinkCollection As IHTMLElementCollection
Dim linkElement As HTMLLinkElement
Dim strLink As String
Dim strOuter As String
Dim intCount As Integer
Dim strFindMid As String
strFindMid = "href=" & """"
'view to go straight to upload
Set objIE = CreateObject("InternetExplorer.Application")
objIE.Visible = True
objIE.navigate strURL
'wait to page comes up
While objIE.ReadyState <> 4 Or objIE.Busy = True: Wend
Set htmlDoc = objIE.Document
While htmlDoc.ReadyState <> "complete": Wend
Set LinkCollection = htmlDoc.getElementsByTagName("A")
intCount = 0
For Each linkElement In LinkCollection
Debug.Print "A element Index " & intCount
strOuter = linkElement.outerHTML
If InStr(strOuter, strFindMid) Then
strOuter = Left(strOuter, InStrRev(strOuter, """" & ">") - 1)
strLink = Mid(strOuter, InStrRev(strOuter, strFindMid) + 6)
End If
Debug.Print "strOuter = " & strOuter
Debug.Print "strLink = " & strLink
intCount = intCount + 1
Next
Set htmlElement = Nothing
Set LinkCollection = Nothing
Set htmlDoc = Nothing
Set objIE = Nothing
End Sub