Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How find maximum top+height property of a collection of shapes
Does anyone know how to find the highest top and height property from
a collection of shapes? Basically I am trying to find the bottom of the lowest of a group of shapes in order to see how far downward on the worksheet in order so that I can draw a vertical line on the same worksheet but no lower than the lowest shape object on the worksheet. Thanks much, Chet |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How find maximum top+height property of a collection of shapes
One way, if I understand you correctly :
Public Sub LowestShape() Dim nLowest As Long Dim nTemp As Long Dim sh As Shape For Each sh In ActiveSheet.Shapes nTemp = sh.Top + sh.Height If nTemp nLowest Then nLowest = nTemp Next sh MsgBox "Height of line: " & nLowest End Sub In article .com, "Chet" wrote: Does anyone know how to find the highest top and height property from a collection of shapes? Basically I am trying to find the bottom of the lowest of a group of shapes in order to see how far downward on the worksheet in order so that I can draw a vertical line on the same worksheet but no lower than the lowest shape object on the worksheet. Thanks much, Chet |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
How find maximum top+height property of a collection of shapes
Thanks much!... That worked like a charm.!....................
On Feb 19, 11:49 pm, JE McGimpsey wrote: One way, if I understand you correctly : Public Sub LowestShape() Dim nLowest As Long Dim nTemp As Long Dim sh As Shape For Each sh In ActiveSheet.Shapes nTemp = sh.Top+ sh.Height If nTemp nLowest Then nLowest = nTemp Next sh MsgBox "Height of line: " & nLowest End Sub In article .com, "Chet" wrote: Does anyone know how to find the highesttopand height property from a collection of shapes? Basically I am trying to find the bottom of the lowest of a group of shapes in order to see how far downward on the worksheet in order so that I can draw a vertical line on the same worksheet but no lower than the lowest shape object on the worksheet. Thanks much, Chet- Hide quoted text - - Show quoted text - |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
problem with shapes.nodes collection in excel 2007 | Excel Programming | |||
maximum row height | Excel Discussion (Misc queries) | |||
maximum number of members in a collection | Excel Programming | |||
Using a collection as a property | Excel Programming | |||
Enabled Property of Shapes? | Excel Programming |