Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 87
Default How to program a macro that moves my chart as I scroll through myspreadsheet.

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 151
Default 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

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
Scroll bar moves too short Dima Excel Discussion (Misc queries) 19 June 2nd 09 10:05 PM
Screen does not scroll as active cell moves down the page KimC Excel Discussion (Misc queries) 3 May 8th 07 06:45 PM
Cant scroll down in 2002 xls, slider moves, but stays on first 25 Geoff C Excel Discussion (Misc queries) 1 February 16th 06 07:40 PM
In Excel - how do you use scroll bar so the spreadsheet moves? Jerry Excel Discussion (Misc queries) 0 August 29th 05 04:04 AM
Excel now moves Left & Right when I scroll the mouse not Up & Down Randyz77 Excel Discussion (Misc queries) 0 May 2nd 05 04:32 PM


All times are GMT +1. The time now is 04:17 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"