View Single Post

  #1 (permalink)  
Old 10-06-2006
sharoma sharoma is offline
Junior Member
White Belt
 
Join Date: Oct 2006
Posts: 8
Cannot CreateObject("MapPoint.Application")

Hi, I am new to MapPoint and using MapPoint 2006. My very first line of MapPoint code throws an error "Run-time error '429': ActiveX component cannot create object"

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
Reply With Quote