Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default select shape range

Hello

I have an array that contains names of 10 shapes in excell sheet. Now
I would like to make a function that will select all the shapes from
the array and group them. I was thinking of somthing like this...but
it doesn't work.

ActiveSheet.shapes.Range(array_shapes()).Select

where I did:

Public array_shapes as shapes

What I am doing wrong?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default select shape range

AA and AC work for me. AB does not.

Sub AA()
Dim v1(0 To 1) As Variant
v1(0) = "Oval 1"
v1(1) = "Rectangle 5"
ActiveSheet.Shapes.Range(v1).Select

End Sub
Sub AB()
Dim v As Variant
v = Array("Oval 1", "Rectangle 5")
ActiveSheet.Shapes.Range(v).Select
End Sub

Sub AC()
ActiveSheet.Shapes.Range(Array( _
"Oval 1", "Rectangle 5")).Select

End Sub

--
Regards,
Tom Ogilvy



"Monte0682" wrote:

Hello

I have an array that contains names of 10 shapes in excell sheet. Now
I would like to make a function that will select all the shapes from
the array and group them. I was thinking of somthing like this...but
it doesn't work.

ActiveSheet.shapes.Range(array_shapes()).Select

where I did:

Public array_shapes as shapes

What I am doing wrong?


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default select shape range

I have an array that contains names of 10 shapes in excell sheet. Now
I would like to make a function that will select all the shapes from
the array and group them. I was thinking of somthing like this...but
it doesn't work.

Did you try to start the macro recorder, do the selection/grouping manually,
and to see what code it generates?

FM


Reply
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
Select Shape in activerow Thomp Excel Programming 2 February 16th 07 09:30 PM
how to select a shape EXCEL$B!!(BNEWS Excel Programming 6 June 12th 06 03:32 AM
Possible to select a range of cells from a Shape Object Gummy Excel Programming 1 May 11th 06 12:06 AM
Select shape leading to Out of memory Laguna Excel Programming 4 July 6th 05 04:47 AM
Select Multiple Shape Objects Alan Excel Programming 0 November 24th 04 06:25 AM


All times are GMT +1. The time now is 08:30 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"