Microsoft Office Tutorials and References
In Depth Information
Creating a Scrolling Chart
Creating a Scrolling Chart
Figure 16-15 shows a stock market chart that uses named formulas for the series
data. Cell I1 (named StartRow ) specifies the starting row of the data, and cell I2
(named NumDays ) controls how many days are plotted. Changing either or both of
these cells causes the chart to display the appropriate data. The data consists of 747
days of data, spanning three years.
Refer to Chapter 6 for more information regarding the use of named
formulas for chart series.
Figure 16-15: The data displayed in this chart is determined by the values in cells I1 and I2.
This workbook also contains a simple macro that increments the StartRow cell
within a loop. The result is an animated chart that scrolls to reveal more data. The
AnimateChart macro, which is attached to the button in the worksheet, follows:
Public AnimationInProgress As Boolean
Sub AnimateChart()
Dim StartVal As Long, r As Long
If AnimationInProgress Then
AnimationInProgress = False
End
End If
Search JabSto ::




Custom Search