ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Animating charts (https://www.excelbanter.com/excel-programming/392526-animating-charts.html)

Elceller in distress[_2_]

Animating charts
 
I am creating a program that replaces the source data of a chart. I have set
the program up so that it replaces one line of the source data every second.
I would like the updates to play back almost like an animation.

The program flows as follows:
Select "Sheet1", copy the new line data
Select "Sheet2", paste the new line of data.
Select "Sheet1", move to the next cell
Copy
Select "sheet2", move to the next cell
Paste
Repeat....

Every time the program selects a sheet, the sheet becomes the active window
on my screen. Is there a command that will just let me see the chart? I
would like all the copy, paste and update commands to occur in the background.

Thanks for your time


merjet

Animating charts
 
Don't use the select keyword. Just copy and paste such as follows.

Sheets("Sheet1").Range("C2:C11").Copy _
Sheets("Sheet2").Range("B2:B11")

Hth,
Merjet



Elceller in distress[_2_]

Animating charts
 
Thanks, we are 1/2 of the way home.

Now that I see the chart, it flickers every time it updates. Is it possible
to make it update smoother? I would like to get it to transition smoothly
similar to a picture in PowerPoint. The program starts by zeroing out the
values in the chart, it then fills in the values one second at a time.
Looking at the chart below, it fills in the y value of time 1, waits 1 second
and fills in the value of time 2€¦..


X
X
X
X
X
XXXXXXXXXXXXXXXXXXXXX
1 2 3 4 5 6 7 8 9 10
Time



"merjet" wrote:

Don't use the select keyword. Just copy and paste such as follows.

Sheets("Sheet1").Range("C2:C11").Copy _
Sheets("Sheet2").Range("B2:B11")

Hth,
Merjet




Jon Peltier

Animating charts
 
You could try

Application.ScreenUpdating = False
Sheets("Sheet1").Range("C2:C11").Copy _
Sheets("Sheet2").Range("B2:B11")
Application.ScreenUpdating = True

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______


"Elceller in distress" wrote
in message ...
Thanks, we are 1/2 of the way home.

Now that I see the chart, it flickers every time it updates. Is it
possible
to make it update smoother? I would like to get it to transition smoothly
similar to a picture in PowerPoint. The program starts by zeroing out the
values in the chart, it then fills in the values one second at a time.
Looking at the chart below, it fills in the y value of time 1, waits 1
second
and fills in the value of time 2...


X
X
X
X
X
XXXXXXXXXXXXXXXXXXXXX
1 2 3 4 5 6 7 8 9 10
Time



"merjet" wrote:

Don't use the select keyword. Just copy and paste such as follows.

Sheets("Sheet1").Range("C2:C11").Copy _
Sheets("Sheet2").Range("B2:B11")

Hth,
Merjet







All times are GMT +1. The time now is 11:12 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com