Welcome to MapForums!

When you are signed in, this message, the ads in this row, and the red-underlined link ads all go away.

## User-defined type not defined

This is a discussion on User-defined type not defined within the MapPoint Desktop Discussion forums, part of the Map Forums category; Hello I'm very new in mappoint .I use the european's version of mappoint and I want to calculate the distance ...

1. Senior Member Black Belt
Join Date
Jul 2002
Posts
5,137

## User-defined type not defined

Hello

I'm very new in mappoint .I use the european's version of mappoint and I want to calculate the distance between two vehicules.
I found this ont that adress
http://msdn.microsoft.com/library/de...ublemethod.asp

Code:
```Distance Method
Returns the distance between the start point and end point in the current units.

Syntax
object.Distance &#40;StartLocation, EndLocation&#41;

Parameters
StartLocation &#40;Location object&#41;
Start point of a route.
EndLocation &#40;Location object&#41;
End point of a route.
Result &#40;Double&#41;
Returns the distance between the start point and end point.
Example
Dim objApp As New MapPoint.Application
Dim objMap As MapPoint.Map
Dim objLoc&#40;1 To 2&#41; As MapPoint.Location
Dim dblDistance As Double

Set objMap = objApp.NewMap

'Get two known locations
Set objLoc&#40;1&#41; = objMap.GetLocation&#40;47.75399, -121.97436, 100&#41; 'Seattle, WA
Set objLoc&#40;2&#41; = objMap.GetLocation&#40;47.6779, -122.11032, 100&#41; 'Redmond, WA

'Retrieve the distance
MsgBox objMap.Distance&#40;objLoc&#40;1&#41;, objLoc&#40;2&#41;&#41;```
my problem is his doesn't recognise those extensions:
- As New MapPoint.Application
- As MapPoint.Map
- As MapPoint.Location

does exist an equivalence with Mappoint europe 2002

have a nice day[/url]

2. Are you using the activeX control?

How are you dimensioning your objmap in other code you have developed so far?