×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

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

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

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

(OP)
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

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources