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

Type mismatch error

This is a discussion on Type mismatch error within the MapPoint Desktop Discussion forums, part of the Map Forums category; Hi All in regard to the code below I get error 13 type mismatch on line marked with ##, Any ...

  1. #1
    starbuck's Avatar
    starbuck is offline Member Green Belt
    Join Date
    Oct 2003
    Posts
    68

    Type mismatch error

    Hi All

    in regard to the code below I get error 13 type mismatch on line marked with ##, Any ideas why please.
    Thanks in advance




    Dim oOrgLoc As mappoint.Location
    Dim oMap As mappoint.Map
    Dim objApp As New mappoint.Application
    Dim dblOrgLat As Double, dblOrgLon As Double
    Dim pCode As String

    If Len(Postcode_txt) = 0 Then Exit Sub
    pCode = Trim$(Postcode_txt)
    objApp.Visible = False
    objApp.UserControl = False

    Set oMap = objApp.ActiveMap
    oMap.Altitude = 1
    ## Set oOrgLoc = oMap.FindAddressResults(, , , , pCode, geoCountryUnitedKingdom)
    CalcPos oMap, oOrgLoc, dblOrgLat, dblOrgLon

  2. #2
    Dazzer is offline Senior Member Green Belt
    Join Date
    Sep 2003
    Posts
    103
    Try this

    Dim strCounty As String

    strCountry = "UnitedKingdom"

    Set oOrgLoc = oMap.FindAddressResults(, , , , pCode, strCounty)

  3. #3
    starbuck's Avatar
    starbuck is offline Member Green Belt
    Join Date
    Oct 2003
    Posts
    68

    Same error

    Thanks for tip but same error.
    What I am trying to do is get lat/lon from the postcode, any ideas?

  4. #4
    starbuck's Avatar
    starbuck is offline Member Green Belt
    Join Date
    Oct 2003
    Posts
    68

    Got it

    The line should be

    Set oOrgLoc = oMap.FindAddressResults(, , , , pCode, strCountry)(1)

    Now it works, thanks..

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Parser Error Message: Could not load type 'StoreLocatorVB.Gl
    By mike91 in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 06-13-2006, 04:32 PM
  2. FIXED: Type Mismatch in DisplayDataMap
    By gavin in forum MapPoint Desktop Discussion
    Replies: 5
    Last Post: 08-22-2005, 04:50 AM
  3. Type of itinerary
    By ifc in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 04-28-2004, 09:32 AM
  4. Type Mismatch adding pushpin....
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 2
    Last Post: 11-22-2003, 11:53 AM
  5. Mime Type for .ptm files?
    By kebernet in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 07-01-2003, 04:11 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