error 70 - Permission denied
.....
For Each link In doc.links
hreference = link.getAttribute("href")
If hreference Like "*/group/pp_dist/message/#*" Then
link.Click
Do While brsr.Busy
Loop
MsgBox doc.body.innerText
End If
Next link
I would guess that what is happening is that as soon as you follow the
first link the "doc" object which owns your collection of links
disappears. Try first stuffing all of the links into an array or
collection and then iterating through that (perhaps using .navigate to
get to each URL).
Tim.
"MT" wrote in message
...
I am attempting some data mining online out of excel. I have managed
to log
onto the site and descend down a couple levels of links to the page
I want. I
know want to process all the messages on this page. All the messages
are
hyperlinks that are numbered and have an
href="/group/pp_dist/message/messagenumber. I am iterating through
the links
in a loop and accessing the first such link on the page works fine
but the
second one is giving me the error above.
Here is the code. Please, disregard absence of error checking unless
it has
a bearing on the solution.
Private Sub connect()
Dim brsr As SHDocVw.InternetExplorer
Dim doc As MSHTML.HTMLDocument
Dim link As HTMLLinkElement
Dim form As HTMLFormElement
|