+ Reply to Thread
Results 1 to 2 of 2

error 70 - Permission denied

  1. #1
    MT
    Guest

    error 70 - Permission denied

    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
    Dim username As String
    Dim passwd As String
    Dim hreference As String
    Dim re As VBScript_RegExp_55.RegExp

    Set brsr = New SHDocVw.InternetExplorer
    brsr.navigate "http://groups.yahoo.com"
    'brsr.Visible = True
    username = " "
    passwd = " "
    Set re = New VBScript_RegExp_55.RegExp
    re.Pattern = "*/group/pp_dist/messages*/\d+"
    re.IgnoreCase = True
    re.Global = True

    Do While brsr.Busy
    Loop

    Set doc = brsr.document
    If doc.forms.Length > 2 Then
    With doc
    .all("login").Value = username
    .all("passwd").Value = passwd
    .all(".save").Click
    End With
    End If

    Do While brsr.Busy
    Loop

    For Each link In doc.links
    'MsgBox link.innerText
    If link.innerText = "pp_dist" Then
    link.Click
    Exit For
    End If
    Next link

    Do While brsr.Busy
    Loop

    For Each link In doc.links
    'MsgBox link.innerText
    If link.innerText = "Messages" Then
    link.Click
    Exit For
    End If
    Next link

    Do While brsr.Busy
    Loop

    For Each form In doc.forms
    If form.className = "getmessagenumber" Then
    form.all("Message.Number.Input").Value = "1"
    form.submit
    Exit For
    End If
    Next form

    Do While brsr.Busy
    Loop

    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
    brsr.Visible = True
    End Sub

  2. #2
    Tim Williams
    Guest

    Re: 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" <[email protected]> wrote in message
    news:[email protected]...
    >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




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1