Community of VE/MapPoint Users and Developers
This is a discussion on Cannot CreateObject("MapPoint.Application") within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; Hi, I am new to MapPoint and using MapPoint 2006. My very first line of MapPoint code throws an error ...
| |||||||
| Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| Cannot CreateObject("MapPoint.Application") Here is the code snippet: Dim objApp As MapPoint.Application Private MyMap As Map On Error Goto logerr Set objApp = GetObject(, "MapPoint.Application") If objApp Is Nothing Then Set objApp = CreateObject("MapPoint.Application") objApp.Visible = False objApp.UserControl = True objApp.Activate Set MyMap = objApp.NewMap() End If What am I missing in the code or is it a configuration issue. Please Help. Thanks |
| |||
| Mappoint Object Library
You need to add the Microsoft MapPoint 11.0 Object Library as a reference in the VBA window. There is info on how to do this at the top of this page: Excel User-Defined Functions and MapPoint - MapPoint Articles - MP2K Magazine I was running into the same issue yesterday, and that was all I had to do to fix it. Good Luck! |
| |||
|
Hi, GetObject generate an exception error 429 when the object is still not existand, see this page: GetObject Function (Visual Basic) So if you want to check if it exists already for eventually re-use then you have to place it into an exception block. Something like this: Code: Try
GetObject ...
Catch
CreateObject...
End
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet Last edited by Wilfried; 10-06-2006 at 12:59 PM. |
| |||
|
I commented that part but now it is throwing the same error at "CreateObject("Mappoint.Application")" ''''''Set objApp = GetObject(, "MapPoint.Application") If objApp Is Nothing Then Set objApp = CreateObject("Mappoint.Application") Set MyMap = objApp.OpenMap("C:\ITMS\MAPSHARE\ITMS.PTM") If (MyMap Is Nothing) Then Set MyMap = objApp.NewMap() End If Else |
| |||
|
Hi, I'm not sure if this is case sensitive: "MapPoint.Application" However I see something else in your original post: "Run-time error '429': ActiveX component cannot create object". It seems that you use the ActiveX control also in your application, is that right ? Because as far as I know you can not mix the AcitveX control and the object model in the same application.
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
| |||
|
I tried so many things but nothing works. Intrestingly the same code(literally as it is) works like a charm in MapPoint 2004. However the same code fails to instanstiate the object(as the error 429 states) when run in MapPoint 2006. Note: Interestingly the MapPoint.exe can be seen thru TaskManager. Here are some of my observation. My Source Code is in VB6 (SP5) The VB6 Project adds reference to "Microsoft MapPoint 13.0 Object Library (North America). I am not using MapPoint.ocx to display any Map. MapPoint 2004 software is using VC++6 DLLs MapPoint 2006 software is using VC++7 DLLs Not sure if my PC needs additional runtime files for VC++7 to run effectively. |
| |||
| But wy is the error melding complaining about the AcitveX ?
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
| |||
|
Hi, Eventually I do a test on my machine. At least we know then if it has something todo with the MapPoint installation. If you send the project to my personal email then I do a short test.
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
![]() |
| ||||
| Posted By | For | Type | Date | |
| Acc2003 - Mappoint 2006 TimeOut - MS-Office-Forum | This thread | Refback | 12-24-2007 02:24 AM | |
| Acc2003 - Mappoint 2006 TimeOut - MS-Office-Forum | This thread | Refback | 01-18-2007 02:55 AM | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| MapPoint 2004 Active-X control: how to "bump" pus | citrix_99301 | MapPoint 2006/2009 Discussion | 3 | 03-18-2006 02:50 AM |
| Mappoint exception "Call was rejected by callee" | jliao81 | MapPoint 2006/2009 Discussion | 1 | 06-03-2005 07:53 AM |
| Do I need "Autoroute Europe", if I install "M | bigtail | MapPoint 2006/2009 Discussion | 1 | 03-23-2004 11:58 PM |
| MapPoint "Fleet Application" definition | Anonymous | MapPoint 2006/2009 Discussion | 5 | 08-26-2003 02:16 PM |
| "Microsoft Mappoint" writing and Pushpin Highligth | feanor | MapPoint 2006/2009 Discussion | 0 | 03-12-2003 04:47 AM |
Holidays Benidorm
Make your holidays in Benidorm to enjoy over 1000 bars, clubs and restaurants! The beaches are superb with great facilities and watersports. Book online...
Honeymoon Holidays
Book your Honeymoon holiday with Travel Counsellors. A personal advisor will help you plan the perfect honeymoon holiday.
Holiday Cuba
Most of all though, you will remember your Holiday in Cuba for the people. Naturally open and friendly with the warmest welcome in the Caribbean. Book at dealchecker.co.uk today.
All Inclusive Maldives
Visit The Holiday Place.co.uk for great deals on all inclusive holidays to the Maldives. Book a holiday to the outstandingly beautiful Maldives.
Holidays
For bargain holidays to destinations including Mexico, South Africa, India and more, visit ULookUBook online today. Check out our free travel guides to help you make an informed decision for your holidays.
Inclusive late deals
For inclusive late deals, check out your options at Travel.co.uk and have fun!
Gran Canaria Holidays
Visit the Canary Islands! See information on Gran Canaria holidays at On The Beach!