Invalid pointer error -2147467261

B

Brian

The code below gets to the ErrorHandler: label but generates an "invalid
pointer" error (-2147467261) when attempting to Resume Next.

Here is a trimmed-down version of the germane code:

MapPoint-related objects previously dimensioned above here...

On Error GoTo ErrorHandler
Dim AddressFound as Boolean
AddressFound = True
'create pushpin in MapPoint
MPApp.ActiveMap.AddPushpin AddressLocation, WaypointName
If Not AddressFound, blah, blah, blah
End If
Exit Sub

ErrorHandler:
Select Case Err.Number
Case -2147217383 'correctly gets here on address not found
AddressFound = False
Resume Next
End Select
 
B

Brian

It was my own fault, and it was in the line of code just above the one I
posted, so it was a bad question. I was trying to handle the error on the
placement of hte point on the map, one line AFTER the actual failure, which
was in attempting to locate the point before it could place the object there.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top