Thread: Group Shapes
View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Zone Zone is offline
external usenet poster
 
Posts: 269
Default Group Shapes

Jim and Greg, Many thanks for your replies. This works great. I was
on the right track and was pretty close, but I tripped over explicitly
declaring the array of type Variant, and I needed the Excel.ShapeRange
object. Jim, your comments gave me the specific solution to the
problem, but both your replies were very helpful to me. Thanks again!
Best regards, James
Jim Cone wrote:
James,
The array containing the names needs to be an array of variants,
not a variant containing an array...
Dim MyArray() as Variant

Load your array with the particular shape names, then use it like this...
Dim shpGroup as Excel.ShapeRange
Set shpGroup = ActiveSheet.Shapes.Range(MyArray)
shpGroup.Group
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware



"Zone"
wrote in message
I have a number of shapes on my worksheet. I want to group only SOME
of these. I can fill an array with the names of the shapes I want to
group, but how do I tell VBA which shapes to group together? TIA,
James