H
Hakyab
A problem occured when I tried to copy a shape group in VBA(Excel 2007). This
is what the code looks like
workbooks(1).shapes("name").parentgroup.copy
workbooks(2).activesheet.paste
Visually this works as intended, I see the same group of shapes in workbook
2. GroupName.GroupItems list the correct shapes, however, the CHILD property
of individual shapes are now set to 0. I get an error when I try to access
the group:
workbooks(2).shapes("name"),parentgroup <-- gives "runtime error 1004,
subscript out of range."
Is there a better way of doing this? Should I just copy the shapes and set
their positions manually? (I needed to keep relative positions of the boxes
fixed, that is why I tried throguh a group)
is what the code looks like
workbooks(1).shapes("name").parentgroup.copy
workbooks(2).activesheet.paste
Visually this works as intended, I see the same group of shapes in workbook
2. GroupName.GroupItems list the correct shapes, however, the CHILD property
of individual shapes are now set to 0. I get an error when I try to access
the group:
workbooks(2).shapes("name"),parentgroup <-- gives "runtime error 1004,
subscript out of range."
Is there a better way of doing this? Should I just copy the shapes and set
their positions manually? (I needed to keep relative positions of the boxes
fixed, that is why I tried throguh a group)