Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I recorded a macro and it came up with the following line (among others):
ActiveSheet.Shapes("Button 25").Select Assuming I have multiple shapes (Buttons) on my worksheet, How do I determine the name of each Shape ("Button 25" in this case)? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
One way:
Select the button. Look in the Name box on the left side of the Formula bar. In article , "bw" wrote: I recorded a macro and it came up with the following line (among others): ActiveSheet.Shapes("Button 25").Select Assuming I have multiple shapes (Buttons) on my worksheet, How do I determine the name of each Shape ("Button 25" in this case)? |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi bw, try the following, it will put the names in column A
Sub test() ' Dim mySh As Shape For Each mySh In ActiveSheet.Shapes Cells(Rows.Count, 1).End(xlUp)(2).Value = mySh.Name Next mySh End Sub Best regards, Les Stout *** Sent via Developersdex http://www.developersdex.com *** |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thank you both, JE and Les!
And now I know... Bernie "bw" wrote in message ... I recorded a macro and it came up with the following line (among others): ActiveSheet.Shapes("Button 25").Select Assuming I have multiple shapes (Buttons) on my worksheet, How do I determine the name of each Shape ("Button 25" in this case)? |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sub shhapes()
n = ActiveSheet.Shapes.Count For i = 1 To n MsgBox (ActiveSheet.Shapes(i).Name) Next End Sub -- Gary''s Student - gsnu200737 "bw" wrote: I recorded a macro and it came up with the following line (among others): ActiveSheet.Shapes("Button 25").Select Assuming I have multiple shapes (Buttons) on my worksheet, How do I determine the name of each Shape ("Button 25" in this case)? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
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) |