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 8 of 8

Getting Started

This is a discussion on Getting Started within the MapPoint Desktop Discussion forums, part of the Map Forums category; Hi, I was looking at your tutorial sheets in relation to programming mappoint through excel and VBA. I am unfortunately ...

  1. #1
    rosshood10 is offline Junior Member White Belt
    Join Date
    Aug 2006
    Posts
    5

    Getting Started

    Hi,

    I was looking at your tutorial sheets in relation to programming mappoint through excel and VBA. I am unfortunately however having problems with the small piece of code as follows

    Dim oApp As MapPoint.Application

    Private Sub CommandButton1_Click()

    Set oApp = CreateObject("MapPoint.Application.NA.11")
    oApp.Visible = True

    End Sub

    I have a button on the spreadsheet to click as suggested, but the problem lies with the first line, this error occurs -
    'Compile Error - User-defined type not defined'

    I followe the instructions accurately but don't understand what my problem is. Regards, Ross

  2. #2
    Wilfried is offline Senior Member Black Belt
    Join Date
    Nov 2004
    Location
    Belgium
    Posts
    2,433
    Hi,

    So it seems that the compiler cannot find Mappoint.Application. I assume you have to set a reference to the type library somewhere. I dont know the IDE, but something as 'add' - 'reference' - then search for type library.

    I do not know VBA, so please be patient with my answer

  3. #3
    Eric Frost's Avatar
    Eric Frost is offline Administrator Black Belt
    Join Date
    Jul 1992
    Posts
    5,094
    Blog Entries
    4
    I think Wilfried is right.

    Check the very first tutorial --

    What's New at MP2K Magazine - The Magazine for MapPoint

    ( full set of links are at Working With Excel and MapPoint - MP2K Magazine )

    Make sure you did this step -- "Now go to Tools | References and scroll down through the Available References. Check the box next to Microsoft MapPoint 11.0 Object Library (either North America or Europe) and click OK."

    hope this helps.

    Eric
    ~ Order MapPoint MapPoint 2013 Here and Get Free Access to the MapForums Downloads ~
    ~~
    ~ Upgrade to Get Access to the MapForums Downloads ~

  4. #4
    rosshood10 is offline Junior Member White Belt
    Join Date
    Aug 2006
    Posts
    5
    Hi Eric\Willfred, thanks for your quick response.

    Unfortunately I'm still having problems, it flags the line
    Set oApp = CreateObject("MapPoint.Application.NA.11")

    what does the NA.11 stand for? I'm using the european version of the software. I'm am extremely stumped guys!

    Regards

  5. #5
    Wilfried is offline Senior Member Black Belt
    Join Date
    Nov 2004
    Location
    Belgium
    Posts
    2,433
    Hi,

    Please mention if you have a compile time or runtime error. I assume runtime this time. The string for the european version should be:

    Code:
    MapPoint.Application.EU.11
    NA is North America, and 11 is the version.

  6. #6
    rosshood10 is offline Junior Member White Belt
    Join Date
    Aug 2006
    Posts
    5

    Smile

    Thank you kindly,

    as you can probably guess, programming is not my strong point!

    regards,

    Ross

  7. #7
    Wilfried is offline Senior Member Black Belt
    Join Date
    Nov 2004
    Location
    Belgium
    Posts
    2,433
    Hi,

    No problem. If you have futher question just fire them here (after trying yourself of course We are all glad to help.

  8. #8
    Eric Frost's Avatar
    Eric Frost is offline Administrator Black Belt
    Join Date
    Jul 1992
    Posts
    5,094
    Blog Entries
    4
    I think the .EU.11 part is optional, if the line is just

    Set oApp = CreateObject("MapPoint.Application")

    it will open whatever is the default MapPoint application whether it be MapPoint 2002, 2004, 2006 or North America or the European maps. If you have more than one version installed I think it will try to open whichever was last opened.

    Eric
    ~ Order MapPoint MapPoint 2013 Here and Get Free Access to the MapForums Downloads ~
    ~~
    ~ Upgrade to Get Access to the MapForums Downloads ~

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Developing with MapPoint and Excel - Getting Started
    By Eric Frost in forum MP2K Magazine Articles
    Replies: 19
    Last Post: 11-22-2010, 10:18 PM
  2. Getting Started with VB6 and MapPoint 2004
    By takk in forum MapPoint Desktop Discussion
    Replies: 5
    Last Post: 08-17-2010, 06:34 PM
  3. addpushpin - need help to get started
    By BWard in forum MapPoint Desktop Discussion
    Replies: 7
    Last Post: 12-19-2005, 03:15 PM
  4. Getting Started with the Virtual Earth Map Control
    By Eric Frost in forum MP2K Magazine Articles
    Replies: 0
    Last Post: 08-02-2005, 04:39 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 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96