Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Rowheight vs. Activechart.parent.top 1

Status
Not open for further replies.

Jamesm601

Programmer
Feb 6, 2004
27
US
Hi All.

I'm trying to create a function that will place a chart directly below a given row on a worksheet. I've gotten close by using a for loop to load a variable (top) with the combined row height of all rows in a given range, then setting ActiveChart.Parent.top to that value.

---------------
For i = 1 To row + 6
top = top + Range(Cells(row - 1, 7), Cells(row + 6, 9)).Rows(i).RowHeight
Next

'then later...

With ActiveChart.Parent
.top = top ' reposition
End With
----------------

The problem is that rows(i).rowheight is not measured on the same scale as ActiveChart.Parent.top. I believe rowheight is based on points just as font size is, but I can't seem to find out what ActiveChart.Parent.top is based on. I need to know this to equate the two so that my chart positioning is precise and predictable. Right now it sort of drifts.

Any thoughts?

Thanks in advance.

James M.
 
Have you tried something like this ?
ActiveChart.Parent.Top = ActiveSheet.Rows(7).Top

Hope This Help
PH.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top