NonAcctDoug
Computer
- May 13, 2005
- 1
See code below:
Whenever I do anything like add/delete or whatever I keep geting the dialog that asks if I want to save changes to the map. Why?
Using MapPoint 2004
Excel 2002 (10.4302.4219)SP2
Microsoft Windows XP Professional-
Version 5.1.2600 Service Pack 2 Build 2600
Stumped,
Doug
Public Function MPRouteDist(iMPType As Integer, ParamArray WPoints())
Application.Volatile False
Dim objApp As New MapPoint.Application
Set objMap = objApp.ActiveMap
With objMap.ActiveRoute
For Each wpoint In WPoints
.Waypoints.Add objMap.FindResults(wpoint).Item(1)
Next
.Waypoints.Item(1).SegmentPreferences = iMPType
.Calculate
MPRouteDist = Application.Round(CStr(.Distance), 2)
objMap.Saved = True
objApp.ActiveMap.Saved = True
End With
objMap.Saved = True
objApp.ActiveMap.Saved = True
End Function
Whenever I do anything like add/delete or whatever I keep geting the dialog that asks if I want to save changes to the map. Why?
Using MapPoint 2004
Excel 2002 (10.4302.4219)SP2
Microsoft Windows XP Professional-
Version 5.1.2600 Service Pack 2 Build 2600
Stumped,
Doug
Public Function MPRouteDist(iMPType As Integer, ParamArray WPoints())
Application.Volatile False
Dim objApp As New MapPoint.Application
Set objMap = objApp.ActiveMap
With objMap.ActiveRoute
For Each wpoint In WPoints
.Waypoints.Add objMap.FindResults(wpoint).Item(1)
Next
.Waypoints.Item(1).SegmentPreferences = iMPType
.Calculate
MPRouteDist = Application.Round(CStr(.Distance), 2)
objMap.Saved = True
objApp.ActiveMap.Saved = True
End With
objMap.Saved = True
objApp.ActiveMap.Saved = True
End Function