LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 188
Default Selecting All AutoShapes on a Worksheet


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



 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Selecting a row in a worksheet Rochelle in Melbourne Excel Worksheet Functions 1 April 9th 09 11:34 AM
Selecting Autoshapes in Excel 2003 Varne Excel Discussion (Misc queries) 2 May 24th 08 01:53 PM
selecting a worksheet rocket0612 Excel Worksheet Functions 2 March 1st 06 09:47 AM
Hide AutoShapes On Excel Worksheet Dave Y Excel Worksheet Functions 5 June 12th 05 04:26 AM
How to rename autoshapes on a worksheet Mark Stephens Charts and Charting in Excel 1 April 2nd 05 04:52 PM


All times are GMT +1. The time now is 07:15 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"