Animating charts

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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
 
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
 
You could try

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

- Jon
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top