Solved

controling webbrowser control  error messages

Posted on 1998-06-03
8
216 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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 100 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
passing parameter in sql procedure 9 70
Adding to a VBA? 6 93
Assign a value in Excel V-Basic 3 38
VBA Replace Function - What am I missing? 3 52
I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
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…

752 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