Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello
I have an array that contains names of 10 shapes in excell sheet. Now I would like to make a function that will select all the shapes from the array and group them. I was thinking of somthing like this...but it doesn't work. ActiveSheet.shapes.Range(array_shapes()).Select where I did: Public array_shapes as shapes What I am doing wrong? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
AA and AC work for me. AB does not.
Sub AA() Dim v1(0 To 1) As Variant v1(0) = "Oval 1" v1(1) = "Rectangle 5" ActiveSheet.Shapes.Range(v1).Select End Sub Sub AB() Dim v As Variant v = Array("Oval 1", "Rectangle 5") ActiveSheet.Shapes.Range(v).Select End Sub Sub AC() ActiveSheet.Shapes.Range(Array( _ "Oval 1", "Rectangle 5")).Select End Sub -- Regards, Tom Ogilvy "Monte0682" wrote: Hello I have an array that contains names of 10 shapes in excell sheet. Now I would like to make a function that will select all the shapes from the array and group them. I was thinking of somthing like this...but it doesn't work. ActiveSheet.shapes.Range(array_shapes()).Select where I did: Public array_shapes as shapes What I am doing wrong? |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have an array that contains names of 10 shapes in excell sheet. Now
I would like to make a function that will select all the shapes from the array and group them. I was thinking of somthing like this...but it doesn't work. Did you try to start the macro recorder, do the selection/grouping manually, and to see what code it generates? FM |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Select Shape in activerow | Excel Programming | |||
how to select a shape | Excel Programming | |||
Possible to select a range of cells from a Shape Object | Excel Programming | |||
Select shape leading to Out of memory | Excel Programming | |||
Select Multiple Shape Objects | Excel Programming |