0

I am making a webbrowser using VB 2010, and I often see popups regarding script errors or advertisement when browsing. I want to disable all message boxes and script error boxes too. I do not want to stop or block scripts from running, I want browser to continue running them but not to show the popup alerts.

WebBrowser1.silent = True isn't working

Thanks in advance

1 Answers1

0

You have tagged this as VB.NET, which I believe is incorrect. In .NET you would use webBrowser.ScriptErrorsSuppressed = true as shown here: Disable JavaScript error in WebBrowser control

The Silent property is available on the ActiveX web browser control in VB6 and probably VBA (?). I believe there is a problem with setting Silent to true there, because it gets set back to false at run time whenever the control is loaded. There is an example on how to work around that by using a timer control, which is available here: http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=43907&lngWId=1

Community
  • 1
  • 1
Oggy
  • 1,516
  • 1
  • 16
  • 22