Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hi All, I am trying to write a small sub that will select all the shapes on a worksheet. The code I have below *seems* to create the array, but how do I then use that array to actually select the shapes? The four lines I hav commented out are the ones I am struggling with - those are my attempts, but they all error out. I am using Excel 2000 under Win 2000 Pro with all updates and service packs installed. Thanks, Alan. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- Sub SelectAllShapes() Dim Counter As Integer Dim MyShape As Shape Dim CurrentShape As Shape Dim ShapesCollection() As Variant Counter = 1 For Each MyShape In ActiveSheet.Shapes Set CurrentShape = ActiveSheet.Shapes(Counter) ReDim Preserve ShapesCollection(Counter) Set ShapesCollection(Counter - 1) = CurrentShape Counter = Counter + 1 Next MyShape 'ActiveSheet.ShapesCollection.Select 'ActiveSheet.Shapes.Range(ShapesCollection).Select 'ActiveSheet.Shapes.Array(ShapesCollection).Select 'ActiveSheet.Shapes.Range(Array(ShapesCollection)) .Select End Sub |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
"Alan" wrote in message
... I am trying to write a small sub that will select all the shapes on a worksheet. Never mind! ActiveSheet.Shapes.SelectAll Talk about trying to over complicate things! Thanks, Alan. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Selecting a row in a worksheet | Excel Worksheet Functions | |||
Selecting Autoshapes in Excel 2003 | Excel Discussion (Misc queries) | |||
selecting a worksheet | Excel Worksheet Functions | |||
Hide AutoShapes On Excel Worksheet | Excel Worksheet Functions | |||
How to rename autoshapes on a worksheet | Charts and Charting in Excel |