Posted on 2007-07-26
I am debugging a project and have trapped an error when a form closes, I wish to clear the error and continue closing the form?
Dim objMap As MapPoint.Map
objMap = Me.AxMappointControl1.ActiveMap
objMap.Saved = True
Catch ex As Exception
If Err.Number = 91 Then
MsgBox(Err.Number & " " & Err.Description)
The immediate window still reports a null error:
A first chance exception of type 'System.NullReferenceException' occurred
The null error is created (I think) because the ax has not been used, is this poor practice, and should I save the ax control at another stage?