D
diglas1 via OfficeKB.com
I create about 200 rectangles on a spreadsheet, then find that to delete them
in the user interface, I've got to manually select each...can't seem to
select them all at once.
I found some answers in FAQ for a VBA solution, but can't seem to get it to
work...perhaps a limitation of Excel 97 ?
Dim WSO As Worksheet
Set WSO = ActiveSheet
WSO.Shapes.Select
Error: "Object doesn't support this property or method"
Does this mean that Excel doesn't support this, or have I missed something ?
However, the following more labour intensive method does work, but I can't
predict how many rectangles I've to select and I'm unable to work out a loop
to populate the "Rectangle 1","Rectangle 2" etc list...can't seem to be able
to create a variable that holds "Rectangle 1","Rectangle 2" without
enclosing the lot in quotes("") as it sees it as a string. Even if I could,
can't get the Array statement to accept a variable as argument list instead
of hardcoded text.
ActiveSheet.Shapes.Range(Array("Rectangle 1":"Rectangle 2")).Select
Any suggestions welcome
Thanks in anticipation.
in the user interface, I've got to manually select each...can't seem to
select them all at once.
I found some answers in FAQ for a VBA solution, but can't seem to get it to
work...perhaps a limitation of Excel 97 ?
Dim WSO As Worksheet
Set WSO = ActiveSheet
WSO.Shapes.Select
Error: "Object doesn't support this property or method"
Does this mean that Excel doesn't support this, or have I missed something ?
However, the following more labour intensive method does work, but I can't
predict how many rectangles I've to select and I'm unable to work out a loop
to populate the "Rectangle 1","Rectangle 2" etc list...can't seem to be able
to create a variable that holds "Rectangle 1","Rectangle 2" without
enclosing the lot in quotes("") as it sees it as a string. Even if I could,
can't get the Array statement to accept a variable as argument list instead
of hardcoded text.
ActiveSheet.Shapes.Range(Array("Rectangle 1":"Rectangle 2")).Select
Any suggestions welcome
Thanks in anticipation.