Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

VBA/Excel/MapPoint Version Problem or What? -- SaveMap

Status
Not open for further replies.

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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor