I've this portion of code with WithEvents words

Once i attempt to compile this code, i've got "error code num 430, the class doesn't managed automation or interface requested"

Is some one have had this king of problem ?

If I remove WithEvents , the event is not captured

Thanks for the help

Dim WithEvents objApp As MapPoint.Application
Dim WithEvents objMap As MapPoint.Map

Private Sub Command1_Click()
Dim objPin As MapPoint.Pushpin
'Add a Pushpin, then select it
Set objPin = objMap.AddPushpin(objMap.FindResults("Seattle, WA")(1))
End Sub

Private Sub Form_Load()
'Set up the application
Set objApp = CreateObject("mappoint.application")
Set objMap = objApp.ActiveMap
objApp.Visible = True
objApp.UserControl = True
End Sub

Private Sub objMap_SelectionChange(ByVal NewSelection As Object, ByVal OldSelection As Object)
End Sub