Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
I would like a way to uniquely identify shapes within a workbook. Is the ID property of Shape unique? Is it only assigned when the shape is created? Is there any other way it can be changed? I'm trying to make sure that it is a good property to use as a unique identifier. Thanks, Dave |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Select the shape and look in the name box to the left of the formula box. Go there and change the name to whatever desired and touch the enter key. -- Don Guillett Microsoft MVP Excel SalesAid Software "lahd" wrote in message ... Hi I would like a way to uniquely identify shapes within a workbook. Is the ID property of Shape unique? Is it only assigned when the shape is created? Is there any other way it can be changed? I'm trying to make sure that it is a good property to use as a unique identifier. Thanks, Dave |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Yes, that is the problem. I'm doing this programmatically and I want a
unique identifier for the shape. Is the ID property of the Shape object unique? The name is not and can be set by the user... "Don Guillett" wrote: Select the shape and look in the name box to the left of the formula box. Go there and change the name to whatever desired and touch the enter key. -- Don Guillett Microsoft MVP Excel SalesAid Software "lahd" wrote in message ... Hi I would like a way to uniquely identify shapes within a workbook. Is the ID property of Shape unique? Is it only assigned when the shape is created? Is there any other way it can be changed? I'm trying to make sure that it is a good property to use as a unique identifier. Thanks, Dave |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
AFAIK the shape's ID property is unique within the workbook and remains
constant while on its original sheet. A new shape will not be given the same ID of some deleted shape You can't directly refer to a shape by it's ID property, would need to loop something like this For each shp in Activesheet.shapes If shp.ID = 1234 then bFound = True Exit For Next If bFound then Msgbox shp.name End If The shape ID property is n/a in older Excel versions, I think introduced in XP Regards, Peter T "lahd" wrote in message ... Yes, that is the problem. I'm doing this programmatically and I want a unique identifier for the shape. Is the ID property of the Shape object unique? The name is not and can be set by the user... "Don Guillett" wrote: Select the shape and look in the name box to the left of the formula box. Go there and change the name to whatever desired and touch the enter key. -- Don Guillett Microsoft MVP Excel SalesAid Software "lahd" wrote in message ... Hi I would like a way to uniquely identify shapes within a workbook. Is the ID property of Shape unique? Is it only assigned when the shape is created? Is there any other way it can be changed? I'm trying to make sure that it is a good property to use as a unique identifier. Thanks, Dave |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thank you that is what I needed to know and plan to do.
"Peter T" wrote: AFAIK the shape's ID property is unique within the workbook and remains constant while on its original sheet. A new shape will not be given the same ID of some deleted shape You can't directly refer to a shape by it's ID property, would need to loop something like this For each shp in Activesheet.shapes If shp.ID = 1234 then bFound = True Exit For Next If bFound then Msgbox shp.name End If The shape ID property is n/a in older Excel versions, I think introduced in XP Regards, Peter T "lahd" wrote in message ... Yes, that is the problem. I'm doing this programmatically and I want a unique identifier for the shape. Is the ID property of the Shape object unique? The name is not and can be set by the user... "Don Guillett" wrote: Select the shape and look in the name box to the left of the formula box. Go there and change the name to whatever desired and touch the enter key. -- Don Guillett Microsoft MVP Excel SalesAid Software "lahd" wrote in message ... Hi I would like a way to uniquely identify shapes within a workbook. Is the ID property of Shape unique? Is it only assigned when the shape is created? Is there any other way it can be changed? I'm trying to make sure that it is a good property to use as a unique identifier. Thanks, Dave |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Can one change shape properties conditionally? | Excel Worksheet Functions | |||
Change Shape Text | Excel Worksheet Functions | |||
change shape by condition | Excel Discussion (Misc queries) | |||
Change Shape Name | Excel Programming | |||
How to change shape of points in chart? | Charts and Charting in Excel |