Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Selecting Multiple Shapes and Lines | Excel Discussion (Misc queries) | |||
Excel 2007 - Select Multiple Shapes | Excel Discussion (Misc queries) | |||
Select and Move Cursor Shapes | New Users to Excel | |||
How Do I ... select multiple shapes in Excel 2007 (similar to 2003 | Excel Discussion (Misc queries) | |||
Using Arrays to select Shapes | Excel Programming |