Solved

controling webbrowser control  error messages

Posted on 1998-06-03
8
214 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
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Macro which automatically send Excel spreadsheet to Outlook problem 2 75
MS Access - Capture pressed key onclick 4 41
MsgBox 2 59
Excel - Save a copy of work book 13 88
Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

792 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