View Single Post

  #1 (permalink)  
Old 09-03-2004
Anonymous Anonymous is offline
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
Selecting Shape Based on Name

I have some code where I want to select a shape based on its name

Dim objShape As MapPoint.Shape
Dim strName As String

strName = "NA123456"

objShape = objMap.Shapes.Item(strName)

Basically something like that, however everytime I run it I get the rather irratating Mappoint has encountered a problem and needs to close window.

If I do

objShape = objMap.Shapes.Item(1)

It works fine

The help files clearly state that you can select a shape based on its name, and all the shapes have been named properly.

Has anyone else encountered a similar problem or has any ideas as to what i'm doing wrong
Reply With Quote