Results 1 to 4 of 4

Thread: Webbrowser control problem. Tested well in IDE. Failed to run as an Exe.

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2014
    Posts
    341

    Webbrowser control problem. Tested well in IDE. Failed to run as an Exe.

    Everything is fine when I run tests in the IDE.
    After I made a exe, and tried to run it as I did in the IDE, I got the error message, shown below:

    Name:  QQ??20150508092014.png
Views: 183
Size:  4.6 KB

    I was able to start the exe and make the webbrowser to navigate to a site. Then I ran into problems in this part:
    vb Code:
    1. Private Sub cmdStart_Click()
    2.     CaptureData
    3.     oDomRev.getElementsByClassName("arrow_container").Item(0).children.Item(3).Click
    4.     Timer1.Enabled = True
    5.     Timer1.Interval = 15000
    6. End Sub
    7.  
    8. Private Sub CaptureData()
    9.     Dim oResultTable As HTMLHtmlElement
    10.     Dim i As Integer, l As Integer
    11.     Set oResultTable = oDomRev.getElementById("theID")
    12.     l = oResultTable.getElementsByTagName("tr").length - 1
    13.     For i = 0 To l
    14.         Debug.Print oResultTable.getElementsByTagName("tr").Item(i).children.Item(6).innerHTML
    15.         strHTMLRev = strHTMLRev & oResultTable.getElementsByTagName("tr").Item(i).children.Item(6).innerHTML & vbNewLine
    16.     Next i
    17. End Sub

    Note that it runs well in the IDE. I only got the error *after compilation*

  2. #2

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2014
    Posts
    341

    Re: Webbrowser control problem. Tested well in IDE. Failed to run as an Exe.

    Ok come back to check this post.
    Seems this time nobody is gonna help me out ...

  3. #3
    PowerPoster
    Join Date
    Jun 2013
    Posts
    7,255

    Re: Webbrowser control problem. Tested well in IDE. Failed to run as an Exe.

    Do you have any DoEvents in your Code (direct or indirect behind some of your own Method-calls)?
    Or is that "OutOfProcess-Remoting"?

    The error you've shown suggests a "Zombie" (an Object-Var or Property
    which still has a Pointer assigned - and therefore is not Nothing - but
    otherwise already dead.

    As said, can happen (especially within Event-Handlers), when Re-Entrancy
    is involved, or OutOfProcess-COM-Marshalling.

    Cannot say much more.

    Olaf

  4. #4
    PowerPoster
    Join Date
    Feb 2006
    Posts
    24,482

    Re: Webbrowser control problem. Tested well in IDE. Failed to run as an Exe.

    Too much we don't know.

    For example, how have you managed page-load state? Anything causing navigation will pull the rug out from under object references to elements in the rendered HTML page. "Runs in IDE" might suggest "runs by luck at all" - in other words a page-state timing issue. Handling DocumentComplete properly is important.

Posting Permissions

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



Click Here to Expand Forum to Full Width