Message 1 of 4
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi Everyone,
I'm writing a function to position my PartsList based on the lower right corner. The Position property controls the position from the top right corner. Hence, to do this, I'll need the height of the PartsList. I can get the total height of the rows. However, I can't seem to find the height for the title and header. Does anyone any idea?
Sub Main()
Dim oSheet As Sheet = ActiveSheet.Sheet
For Each oPartsList As PartsList In oSheet.PartsLists
MovePartsList(oPartsList,0,0)
Next
End Sub
Sub MovePartsList(oPartsList As PartsList, x As Double, y As Double)
oPartsList.Position=ThisApplication.TransientGeometry.CreatePoint2d(x,y+getPartsListHeight(oPartsList))
End Sub
Function getPartsListHeight(oPartsList As PartsList) As Double
getPartsListHeight = 0
getPartsListHeight += 1.178 'supposed to get the header and title heights, however, can't seem to find it in api. Hence, just putting a fixed value here
For Each oRow As PartsListRow In oPartsList.PartsListRows
getPartsListHeight += oRow.Height
Next
End Function
Regards
Ilyas
Solved! Go to Solution.