Webbrowser problems

Well I have 2 problems:

1) Those annoying javascript runtime errors.
I want to ignore them so I have the following code
Private Sub webRegister_DownloadComplete()
    On Error Resume Next
    Set objDoc = webRegister.Document
    Set objWind = objDoc.parentWindow
End Sub
Private Sub webRegister_NavigateComplete2(ByVal pDisp As Object, URL As Variant)
    On Error Resume Next
    Set objDoc = webRegister.Document
    Set objWind = objDoc.parentWindow
End Sub
Public Sub objWind_onerror(ByVal description As String, ByVal URL As String, ByVal line As Long)
    On Error Resume Next
    Set objEvent = objWind.event
    With objEvent
        .returnValue = True
    End With
End Sub

Why I put the On Error Resume Next?  Well if I debug it, I dont have any problems and everything runs fine.  When I compile it and run the *.exe I sometimes get erros.  Why? I have no idea.
Now this code only works when the user has changed the "check for script errors" in IE tools.  But I dont want that.  It has to work without any problems for the user cause it sucks when you have to tell the user what he/she has to do.
The java error I get only happens with a visual basic webbrowser, not when I use firefox or IE and check that site out.

So either I need to ignore those runtime errors or I would like to have a script that enables that specific IE option.

2) http://users.pandora.be/stofferken/stupiderror.JPG <-Since today I am getting this error
I dont remember having changed that much but I didnt get this error before.
I have no clue what it means but it has to do something with my webbrowser I think.
Anyone can explain this error and tell me how to get rid of it?

Please help

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

1) Have you tried setting the WB Silent property to True?

2) No idea, w/o further info on where/when/how that error is occurring.
black_helpAuthor Commented:
1) That option is basically the same as the one I am currently using, but it will force the runtime control to start by just bypassing the error message like if you had pressed "yes"
So thats not at all what I need.

2) I have no further info, thats my problem I only get this error after my program is compiled so I never get this when I debug.
I tried finding the place were this bug occurs by adding messages boxes after every line but it seems to occur @ something like form1.label1.visible = true after the webbrowser had the DownloadComplete event.
black_helpAuthor Commented:
Ok, I recoded my the webbrowser part and I no longer get that second error.
I still dont know what it was but no need to bother anymore.

However my first question still stands.
How to change the IE options?
Is it possible to kill the (runtime check) process without the user having any knowledge about it when a javascript error would occur?
Id very much like to have an answer soon since Ive been looking for this for quite some time now.

Any solution in wich the webbrowser just continues working and the user having no knowledge about possible errors will do.
black_helpAuthor Commented:
Solved it myself:
"HKEY_CURRENT_USER\SOFTWARE\Microsoft\Internet Explorer\Main\Disable Script Debugger" -> "yes"

does the trick

Closed, 500 points refunded.
The Experts Exchange
Community Support Moderator of all Ages

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.