-
May 7th, 2015, 08:38 PM
#1
Thread Starter
Hyperactive Member
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:
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:
Private Sub cmdStart_Click()
CaptureData
oDomRev.getElementsByClassName("arrow_container").Item(0).children.Item(3).Click
Timer1.Enabled = True
Timer1.Interval = 15000
End Sub
Private Sub CaptureData()
Dim oResultTable As HTMLHtmlElement
Dim i As Integer, l As Integer
Set oResultTable = oDomRev.getElementById("theID")
l = oResultTable.getElementsByTagName("tr").length - 1
For i = 0 To l
Debug.Print oResultTable.getElementsByTagName("tr").Item(i).children.Item(6).innerHTML
strHTMLRev = strHTMLRev & oResultTable.getElementsByTagName("tr").Item(i).children.Item(6).innerHTML & vbNewLine
Next i
End Sub
Note that it runs well in the IDE. I only got the error *after compilation*
-
May 9th, 2015, 11:08 PM
#2
Thread Starter
Hyperactive Member
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 ...
-
May 10th, 2015, 05:08 AM
#3
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
-
May 10th, 2015, 07:16 AM
#4
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|