PDA

View Full Version : UserForm webBrowser ctl: how to detect 'no web page found' for a defective url?



Kelvin1011
11-28-2017, 01:08 PM
Excel 2016; VBA.

I have webbrowser control working in Excel UserForm.


If I call it with a legitimate url, I get the web page displayed:
Me.WebBrowser1.Navigate url


If I use a non-existant url, the control displays a coloured text message that the page for that url has not been found.

How do I detect automatically, via vba, that no web page was returned for a (non-existant) url?

Thanks

SamT
11-30-2017, 07:17 AM
Moderator bump