Group drawing objects in VBA

  • Thread starter Thread starter Bubb
  • Start date Start date
B

Bubb

Excel 2002. I have some shapes (lines) that I want to group together
using VBA so I can fill the shape that they form.
 
ActiveSheet.Shapes.Range(Array("Line 3", "Line 4", "Line 1", "Line
2")).Select
Selection.ShapeRange.Group.Select

HTH
 
Thank you. A problem is that there are many other shapes on the sheet
which I don't want in this group, so I need to collect these names in
an array as they are drawn. Since the Shapes.Range(Array...) wants
string names and I don't know how many there will be, I'm confused
about how to dim the array, redim it when I know how many lines there
will be, and use it to select the group of lines. I'm probably not
doing this the best way. Thanks again.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top