Alright - here you go, this will need a little tweaking but should get you the basic idea...
I have a form with a text box - txtAddress
a browser - ocxBrowser
a button - cmdGo
What it does it to take the source code of the page and saves it in a file C:\source.txt. I am thinking you could either just check the innerHTML property for whatever the code looks like on a page not found, or check out the contents of the file.
Code:
Option Compare Database
Option Explicit
Dim objIE As SHDocVw.InternetExplorer
Dim strURL As String
Dim strFileName As String
Private Sub cmdGo_Click()
strURL = txtAddress
Set objIE = Me.ocxBrowser.Object
objIE.Navigate strURL
End Sub
Private Sub Form_Load()
strURL = "http://echovue.com/"
Set objIE = Me.ocxBrowser.Object
objIE.Navigate strURL
End Sub
Private Sub ocxBrowser_DownloadComplete()
On Error Resume Next
strFileName = "C:\Source.txt"
Set objIE = Me.ocxBrowser.Object
Open strFileName For Output As #1
Print #1, objIE.Document.body.innerHTML
Close #1
txtAddress = objIE.LocationURL
Beep
End Sub
Mike
EchoVue.com