How to program a macro that moves my chart as I scroll through my
Hi R Tanner,
I haven't worked out how to do it if you scroll, but this might get you by
until a more knowledgeable person posts something.
If you're using Excel 2003 then you'll have 65536 rows
The Top property of a chart varies from 0 to 840000 for rows 1 to 0
Thus each row = a top property of the row*12.8
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Sheet1.ChartObjects("Chart 1").Top = ActiveCell.Row * 12.8
End Sub
This will reposition the chart to the area of the active cell.
"R Tanner" wrote:
I have a very large spreadsheet. In this spreadsheet, I have a series
of indicators. I have a small macro that bases the chart values off
of my current selection. What I would like to do is program my chart
to move as I scroll. So as I scroll down the spreadsheet, the chart
moves with my current view. Does anyone know how to do this?
Thanks
|