Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 88
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,624
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 88
Default 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
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
problem with shapes.nodes collection in excel 2007 [email protected] Excel Programming 3 December 12th 06 01:27 PM
maximum row height Maria Excel Discussion (Misc queries) 2 August 9th 06 07:04 PM
maximum number of members in a collection excel_ez Excel Programming 8 July 30th 06 10:22 PM
Using a collection as a property GregR Excel Programming 4 August 10th 05 06:02 PM
Enabled Property of Shapes? Joe HM Excel Programming 3 March 14th 05 07:18 PM


All times are GMT +1. The time now is 02:32 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"