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: 11
Default Shapes(Count)

The code below works fine…

Dim shpGroup(10) As Shape
Dim shpTemp As Shape
Dim element
For element = 1 To 10
Set shpGroup(element) = ActiveSheet.Shapes(element)
If shpGroup(element).Type = msoGroup Then
For Each shpTemp In shpGroup(element).GroupItems
Debug.Print "index = " & element, " group " & shpGroup(element).Name,
shpTemp.Name
Next shpTemp
Else
Debug.Print "index = " & element, " shape ", , shpGroup(element).Name
End If
Next element

but statement…

For Each element In ActiveSheet.Shapes(Count) '? .Count .Index

gives error <index unavailable

Any possible reason ?
 
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
excel document with shapes on it but the shapes do not print [email protected] Excel Worksheet Functions 2 October 22nd 09 06:17 PM
Naming Auto Shapes and Creating new Shapes AL2000 Excel Discussion (Misc queries) 3 September 10th 07 04:12 AM
When drawing shapes in excel the shapes keep disappearing Tape Excel Discussion (Misc queries) 1 October 6th 06 04:23 PM
VBA code to count colors/shapes? Nimrod[_2_] Excel Programming 12 May 8th 05 05:14 AM
How can I loop to find the grouped shapes count David Cuthill Excel Programming 3 January 26th 04 08:22 PM


All times are GMT +1. The time now is 10:08 AM.

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"