Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

controling webbrowser control  error messages

Posted on 1998-06-03
8
Medium Priority
?
221 Views
Last Modified: 2010-05-03
When the vb5's webbrowser control generates error messages,
such as err 401 url not found, I want to either disable them or intercept them and force an 'ok'  click  or close then automatically . How can this be done. These messages are modal and lock all other processes within my app.
Please post comment only, unless you have true solution
including code/example as I am new to this.  
thanks in advance for your effort. fred.

0
Comment
Question by:fred12
  • 2
  • 2
  • 2
  • +2
8 Comments
 
LVL 2

Expert Comment

by:ndnet
ID: 1462454
Just put the following line of code at the beginning of each Sub

On Error Resume Next


This will skip the error messages.
0
 

Author Comment

by:fred12
ID: 1462455
ndnet sorry, this does not prevent error messages generated within the webbrowser control, thanks anyway.
0
 
LVL 4

Expert Comment

by:zsi
ID: 1462456
Sorry, Fred, but I do not think that you can.  The Web Browser control is simply a wrapper around Internet Explorer's OLE model.  The OCX will not allow you to supress error messages.

The only way that you might be able to do it is by subclassing IE, but I do not think that it would be worth your time.

If you need more control over the browser, you might want to consider a third-party control that will allow you to do this.
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 1

Expert Comment

by:sirigere
ID: 1462457
I think this can help you out

on error goto ErrLabel

ErrLabel:
msgbox err.number & err.description,vbOkOnly

0
 
LVL 6

Accepted Solution

by:
clifABB earned 400 total points
ID: 1462458
Use this code:
WebBrowser1.Silent = True

You must do this in code as this property is Read/Write in Run-time only.

To recieve errors, such as 404, you might use the Text parameter of the TitleChange event
0
 
LVL 6

Expert Comment

by:clifABB
ID: 1462459
zsi:
Silent does allow you to supress error messages.

sirigere:
WebBrowser does not produce trappable errors.
0
 
LVL 4

Expert Comment

by:zsi
ID: 1462460
clif.

That must have been introduced in IE4, which I am not running.  I guess it is time to upgrade...  :)
0
 

Author Comment

by:fred12
ID: 1462461
excellent cliffabb
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

877 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question