Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
ShapeRange.Name
Dear All,
1) where can I get the name of a shape put in sheet? I usually create a macro, select it, and I find the name in the vba code. 2) is possible to assign a specify name to a shape? Thanks to anyone M. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
ShapeRange.Name
Put some AutoShapes in a sheet and:
Sub qwerty() MsgBox (ActiveSheet.Shapes.Count) i = 0 For Each s In ActiveSheet.Shapes MsgBox (s.Name) s.Name = "mino" & i i = i + 1 Next End Sub will tell: 1. you how many are there 2. their names 3. then re-name them -- Gary''s Student - gsnu2007g "mino" wrote: Dear All, 1) where can I get the name of a shape put in sheet? I usually create a macro, select it, and I find the name in the vba code. 2) is possible to assign a specify name to a shape? Thanks to anyone M. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
ShapeRange.Name
The last inserted shape will be the 'topmost' (assuming you haven't changed
order). Dim shp as Shape Set shp = ActiveSheet.Shapes(ActiveSheet.Shapes.Count) ' fails if no shapes shp.Name = "newUniqueName" See 'AddShape' in help and work with 'shp' Set shp = ActiveSheet.Shapes.AddShape(arg's... shp.name = Regards, Peter T "mino" wrote in message ... Dear All, 1) where can I get the name of a shape put in sheet? I usually create a macro, select it, and I find the name in the vba code. 2) is possible to assign a specify name to a shape? Thanks to anyone M. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
ShapeRange.Name
Many Thanks to you and Gary"s
"Peter T" <peter_t@discussions ha scritto nel messaggio ... The last inserted shape will be the 'topmost' (assuming you haven't changed order). Dim shp as Shape Set shp = ActiveSheet.Shapes(ActiveSheet.Shapes.Count) ' fails if no shapes shp.Name = "newUniqueName" See 'AddShape' in help and work with 'shp' Set shp = ActiveSheet.Shapes.AddShape(arg's... shp.name = Regards, Peter T "mino" wrote in message ... Dear All, 1) where can I get the name of a shape put in sheet? I usually create a macro, select it, and I find the name in the vba code. 2) is possible to assign a specify name to a shape? Thanks to anyone M. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel 2007 and vb... ShapeRange.ScaleWidth problems | Excel Programming | |||
Unselect shaperange object after drawing it with VBA? | Excel Programming | |||
Problem setting RGB Values with ShapeRange | Excel Programming | |||
Selection.ShapeRange.IncrementLeft error | Excel Programming | |||
Selection.ShapeRange.IncrementLeft error | Excel Programming |