利用WebBrowser的NavigateError事件编程即可,比如:
Private Sub WebBrowser1_NavigateError(ByVal pDisp As Object, URL As Variant, Frame As Variant, StatusCode As Variant, Cancel As Boolean)
WebBrowser1.Navigate "本地页面文件名"
Cancel = True
End Sub
已经有很多人问过了
请参考
http://zhidao.baidu.com/question/92031799.html