Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
CLR CLR is offline
external usenet poster
 
Posts: 1,998
Default Select multiple Shapes

Hi All........
Is it possible with code, to be able to select multiple or ALL of the shapes
or drawing objects on a sheet? How about "ranges" like "Line1:Line17", or
"Rectangle36:Rectangle56", or even "all the rectangles listed in G1:G17", or
something like that?

Vaya con Dios,
Chuck CABGx3


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Select multiple Shapes

Hi CLR,

ActiveSheet.DrawingObjects.Select
ActiveSheet.Rectangles.Select
ActiveSheet.Lines.Select
ActiveSheet.Ovals.Select

To limit the collection to a range, I think that you would need to loop
through each, checking the intersection of the shape's TopLeftCell (and
possibly its BottomRightCell) with the range.

---
Regards,
Norman



"CLR" wrote in message
...
Hi All........
Is it possible with code, to be able to select multiple or ALL of the
shapes
or drawing objects on a sheet? How about "ranges" like "Line1:Line17", or
"Rectangle36:Rectangle56", or even "all the rectangles listed in G1:G17",
or
something like that?

Vaya con Dios,
Chuck CABGx3




  #3   Report Post  
Posted to microsoft.public.excel.programming
CLR CLR is offline
external usenet poster
 
Posts: 1,998
Default Select multiple Shapes

Thanks Norman, your suggestion for that first part helps a bunch!

As for the second part, I am not wanting to select all the shapes within an
"Excel cell range", (like A1:G17), rather I want to select "all the
rectangles within the group of Rectangle numbers from Rectangle 1 through
Rectangle 7"......or Group of Rectangle12:24........etc

Vaya con Dios,
Chuck, CABGx3






"Norman Jones" wrote:

Hi CLR,

ActiveSheet.DrawingObjects.Select
ActiveSheet.Rectangles.Select
ActiveSheet.Lines.Select
ActiveSheet.Ovals.Select

To limit the collection to a range, I think that you would need to loop
through each, checking the intersection of the shape's TopLeftCell (and
possibly its BottomRightCell) with the range.

---
Regards,
Norman



"CLR" wrote in message
...
Hi All........
Is it possible with code, to be able to select multiple or ALL of the
shapes
or drawing objects on a sheet? How about "ranges" like "Line1:Line17", or
"Rectangle36:Rectangle56", or even "all the rectangles listed in G1:G17",
or
something like that?

Vaya con Dios,
Chuck CABGx3





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Select multiple Shapes

Hi Chuck,

Try something like:

'=============
Public Sub Tester03()
Dim i As Long

For i = 1 To 7
ActiveSheet.Rectangles("rectangle " & i).Select False
Next i
End Sub
'<<=============



---
Regards,
Norman



"CLR" wrote in message
...
Thanks Norman, your suggestion for that first part helps a bunch!

As for the second part, I am not wanting to select all the shapes within
an
"Excel cell range", (like A1:G17), rather I want to select "all the
rectangles within the group of Rectangle numbers from Rectangle 1 through
Rectangle 7"......or Group of Rectangle12:24........etc

Vaya con Dios,
Chuck, CABGx3






"Norman Jones" wrote:

Hi CLR,

ActiveSheet.DrawingObjects.Select
ActiveSheet.Rectangles.Select
ActiveSheet.Lines.Select
ActiveSheet.Ovals.Select

To limit the collection to a range, I think that you would need to loop
through each, checking the intersection of the shape's TopLeftCell (and
possibly its BottomRightCell) with the range.

---
Regards,
Norman



"CLR" wrote in message
...
Hi All........
Is it possible with code, to be able to select multiple or ALL of the
shapes
or drawing objects on a sheet? How about "ranges" like "Line1:Line17",
or
"Rectangle36:Rectangle56", or even "all the rectangles listed in
G1:G17",
or
something like that?

Vaya con Dios,
Chuck CABGx3







  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Select multiple Shapes

Hi Chuck,

Better would be:

'=============
Public Sub Tester03()
Dim i As Long
Dim j As Long

For i = 1 To 3
j = j + 1
ActiveSheet.Rectangles("rectangle " & i).Select Replace:=j = 1
Next i
End Sub
'<<=============


---
Regards,
Norman



"Norman Jones" wrote in message
...
Hi Chuck,

Try something like:

'=============
Public Sub Tester03()
Dim i As Long

For i = 1 To 7
ActiveSheet.Rectangles("rectangle " & i).Select False
Next i
End Sub
'<<=============



---
Regards,
Norman



"CLR" wrote in message
...
Thanks Norman, your suggestion for that first part helps a bunch!

As for the second part, I am not wanting to select all the shapes within
an
"Excel cell range", (like A1:G17), rather I want to select "all the
rectangles within the group of Rectangle numbers from Rectangle 1 through
Rectangle 7"......or Group of Rectangle12:24........etc

Vaya con Dios,
Chuck, CABGx3






"Norman Jones" wrote:

Hi CLR,

ActiveSheet.DrawingObjects.Select
ActiveSheet.Rectangles.Select
ActiveSheet.Lines.Select
ActiveSheet.Ovals.Select

To limit the collection to a range, I think that you would need to loop
through each, checking the intersection of the shape's TopLeftCell (and
possibly its BottomRightCell) with the range.

---
Regards,
Norman



"CLR" wrote in message
...
Hi All........
Is it possible with code, to be able to select multiple or ALL of the
shapes
or drawing objects on a sheet? How about "ranges" like
"Line1:Line17", or
"Rectangle36:Rectangle56", or even "all the rectangles listed in
G1:G17",
or
something like that?

Vaya con Dios,
Chuck CABGx3











  #6   Report Post  
Posted to microsoft.public.excel.programming
CLR CLR is offline
external usenet poster
 
Posts: 1,998
Default Select multiple Shapes

Thanks Norman.........this one got the job done, I just had to modify a bit
for my XL97 I guess....

ActiveSheet.SHAPES("rectangle " & i).Select Replace:=j = 1

Thanks again,
Vaya con Dios,
Chuck, CABGx3




"Norman Jones" wrote:

Hi Chuck,

Better would be:

'=============
Public Sub Tester03()
Dim i As Long
Dim j As Long

For i = 1 To 3
j = j + 1
ActiveSheet.Rectangles("rectangle " & i).Select Replace:=j = 1
Next i
End Sub
'<<=============


---
Regards,
Norman



"Norman Jones" wrote in message
...
Hi Chuck,

Try something like:

'=============
Public Sub Tester03()
Dim i As Long

For i = 1 To 7
ActiveSheet.Rectangles("rectangle " & i).Select False
Next i
End Sub
'<<=============



---
Regards,
Norman



"CLR" wrote in message
...
Thanks Norman, your suggestion for that first part helps a bunch!

As for the second part, I am not wanting to select all the shapes within
an
"Excel cell range", (like A1:G17), rather I want to select "all the
rectangles within the group of Rectangle numbers from Rectangle 1 through
Rectangle 7"......or Group of Rectangle12:24........etc

Vaya con Dios,
Chuck, CABGx3






"Norman Jones" wrote:

Hi CLR,

ActiveSheet.DrawingObjects.Select
ActiveSheet.Rectangles.Select
ActiveSheet.Lines.Select
ActiveSheet.Ovals.Select

To limit the collection to a range, I think that you would need to loop
through each, checking the intersection of the shape's TopLeftCell (and
possibly its BottomRightCell) with the range.

---
Regards,
Norman



"CLR" wrote in message
...
Hi All........
Is it possible with code, to be able to select multiple or ALL of the
shapes
or drawing objects on a sheet? How about "ranges" like
"Line1:Line17", or
"Rectangle36:Rectangle56", or even "all the rectangles listed in
G1:G17",
or
something like that?

Vaya con Dios,
Chuck CABGx3










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
Selecting Multiple Shapes and Lines Nash Excel Discussion (Misc queries) 1 February 19th 10 11:42 PM
Excel 2007 - Select Multiple Shapes Barb Reinhardt Excel Discussion (Misc queries) 2 March 18th 09 03:17 PM
Select and Move Cursor Shapes marcopolo New Users to Excel 1 September 4th 08 06:40 AM
How Do I ... select multiple shapes in Excel 2007 (similar to 2003 Barb Reinhardt Excel Discussion (Misc queries) 1 July 30th 08 11:00 PM
Using Arrays to select Shapes Don Rouse Excel Programming 1 July 18th 04 07:27 AM


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