Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Referencing Shapes
Hi there,
Can anyone tell me how you can name shapes in excel, so that you can then reference them programatically? I'd like to include a number of small circles that change from red to green on a given condition. At the moment I can only do this using the Selection method, which I want to avoid. Thanks John |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Referencing Shapes
John,
You can either do it by selecting the shape on the worksheet and changing the name in the Names box, or with VBA activesheet.shapes(1).name="Bob" -- HTH RP (remove nothere from the email address if mailing direct) "John" wrote in message ... Hi there, Can anyone tell me how you can name shapes in excel, so that you can then reference them programatically? I'd like to include a number of small circles that change from red to green on a given condition. At the moment I can only do this using the Selection method, which I want to avoid. Thanks John |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Referencing Shapes
Bob,
Thanks very much for this. Having tried out your advice I see that the 1 in brackets indicates the order in which the shapes were placed on the worksheet? If I ran the code to change the shape names, would the name changes be saved with the workbook or would I have to reassign each on Open or something similar? Thanks again John "Bob Phillips" wrote in message ... John, You can either do it by selecting the shape on the worksheet and changing the name in the Names box, or with VBA activesheet.shapes(1).name="Bob" -- HTH RP (remove nothere from the email address if mailing direct) "John" wrote in message ... Hi there, Can anyone tell me how you can name shapes in excel, so that you can then reference them programatically? I'd like to include a number of small circles that change from red to green on a given condition. At the moment I can only do this using the Selection method, which I want to avoid. Thanks John |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Referencing Shapes
As long as you saved the workbook after changing the names, the names would
be retained. -- Regards, Tom Ogilvy "John" wrote in message ... Bob, Thanks very much for this. Having tried out your advice I see that the 1 in brackets indicates the order in which the shapes were placed on the worksheet? If I ran the code to change the shape names, would the name changes be saved with the workbook or would I have to reassign each on Open or something similar? Thanks again John "Bob Phillips" wrote in message ... John, You can either do it by selecting the shape on the worksheet and changing the name in the Names box, or with VBA activesheet.shapes(1).name="Bob" -- HTH RP (remove nothere from the email address if mailing direct) "John" wrote in message ... Hi there, Can anyone tell me how you can name shapes in excel, so that you can then reference them programatically? I'd like to include a number of small circles that change from red to green on a given condition. At the moment I can only do this using the Selection method, which I want to avoid. Thanks John |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Referencing Shapes
Damn that's quick!
Thanks Tom "Tom Ogilvy" wrote in message ... As long as you saved the workbook after changing the names, the names would be retained. -- Regards, Tom Ogilvy "John" wrote in message ... Bob, Thanks very much for this. Having tried out your advice I see that the 1 in brackets indicates the order in which the shapes were placed on the worksheet? If I ran the code to change the shape names, would the name changes be saved with the workbook or would I have to reassign each on Open or something similar? Thanks again John "Bob Phillips" wrote in message ... John, You can either do it by selecting the shape on the worksheet and changing the name in the Names box, or with VBA activesheet.shapes(1).name="Bob" -- HTH RP (remove nothere from the email address if mailing direct) "John" wrote in message ... Hi there, Can anyone tell me how you can name shapes in excel, so that you can then reference them programatically? I'd like to include a number of small circles that change from red to green on a given condition. At the moment I can only do this using the Selection method, which I want to avoid. Thanks John |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
excel document with shapes on it but the shapes do not print | Excel Worksheet Functions | |||
Naming Auto Shapes and Creating new Shapes | Excel Discussion (Misc queries) | |||
When drawing shapes in excel the shapes keep disappearing | Excel Discussion (Misc queries) | |||
How can i get more 3D shapes for Auto shapes in excel? | Excel Discussion (Misc queries) | |||
How can i get more 3D shapes for Auto shapes in excel? | Excel Discussion (Misc queries) |