Você está na página 1de 3

Start

Copyright 2000 John F. Lacher

Excel Tip and Example

Title: Animated Line Chart


Keywords: Chart, Wait Method, Chart Series Description: This example uses a Visual Basic for Applications procedure to update and display different values for a line chart. Each value is displayed for 1 second.

Tip:
You can use the Wait method in Visual Basic for Applications to animate the display of a chart. If you use the Wait method and change the properties of the Series object, the chart will appear to be animated. Each value will show on the chart in sequence. The user of the chart can how the shape of the line changes over time.

Guide to the Example:


Scroll the worksheet Sheet1 so that the line chart is visible. Click on the "Animate Graph" button and view changes in the line chart. The data series used to animate the graph are shown at the top of Sheet1. Module1 contains the Animate and ReplaceSeries procedures.

Page 1

Sheet1

Cash 3 mo 6 mo 1 yr 3 yr

8/1/1980 50% 51% 53% 55% 57% 4/29/1981 79% 80% 81% 82% 84%

9/1/1980 51% 52% 54% 55% 56%

10/1/1980 10/31/1980 11/30/1980 12/30/1980 49% 59% 69% 39% 50% 60% 70% 40% 51% 61% 71% 41% 52% 62% 72% 42% 54% 64% 74% 44%

1/29/1981 49% 50% 51% 52% 54%

2/28/1981 59% 60% 61% 62% 64%

3/30/1981 69% 70% 71% 72% 74%

Cash 3 mo 6 mo 1 yr 3 yr

4/29/1981 100%

90%

80%

70%

60%

50% Cash

3 mo

6 mo

1 yr

3 yr

Page 2

Sheet1

4/29/1981 79% 80% 81% 82% 84%

Page 3

Você também pode gostar