Welcome to MapForums!

Register, sign in, or use Facebook Connect above to join in and participate in the forum.

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

Subscribe to receive our newsletter.
Subscribe Unsubscribe
Results 1 to 2 of 2

VBA with Embedded Maps in MS Office?

This is a discussion on VBA with Embedded Maps in MS Office? within the Development forums, part of the MapPoint Desktop Discussion category; I am having probems embedding a MapPoint map in Excel and then controlling the embedded map with VBA code. I ...

  1. #1
    mf720x is offline Junior Member White Belt
    Join Date
    Aug 2007
    Posts
    2

    VBA with Embedded Maps in MS Office?

    I am having probems embedding a MapPoint map in Excel and then controlling the embedded map with VBA code. I am not sure how to reference the map. MS Excel seems to refer to the object as a shape... if I try to record a macro while making some changes to the map to get a better idea of what to do, the resulting code selects the shape and then uses some generic code like "Selection.Verb Verb:=xlPrimary".

    I have tried to write some code to reference the shape such as:

    ----------
    Dim myMap As MapPoint.Map
    Set myMap = ActiveSheet.Shapes("Object 3")
    ----------

    Also tried:

    ----------
    Dim myMap As MapPoint.Map
    Set myMap = ActiveSheet.Shapes("Object 3")
    ----------

    But both result in "Type mismatch" errors.

    Am I missing an obvious way to reference the embedded map? Thanks for the help!

  2. #2
    mf720x is offline Junior Member White Belt
    Join Date
    Aug 2007
    Posts
    2

    Re: VBA with Embedded Maps in MS Office?

    [Correction to the original post]

    The 2nd code snippet should read:

    ----------
    Dim myApp As MapPoint.Application
    Set myApp = ActiveSheet.Shapes("Object 3")
    ----------

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. General embedded MapPoint questions
    By satacoy in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 09-18-2007, 06:07 PM
  2. Embedded Graphics and MP Control
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 3
    Last Post: 01-27-2005, 05:18 PM
  3. updating an embedded map in Excel
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 08-26-2004, 01:44 PM
  4. MP 2002: does it do the job also with non-XP Office?
    By pwy in forum MapPoint Desktop Discussion
    Replies: 2
    Last Post: 05-14-2003, 06:29 PM
  5. Mappoint control in an Office Application using VBA
    By ToddRCS in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 11-19-2002, 05:00 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36