Animated charts showing change with time

S

stephenm

I have an xy chart and want to look through all the different datasets
for it to show animated change over time.

I really need a way to make a for/while loop which will loop through
from say J5:U5 to J100:U100.
I have tried to use a variable to input in for the range and use the
replace command to keep updating it, one at a time. but no luck
Here is the kind of code i need to be able to generate with the loop.
Any insight into how i could solve this would be helpful

Thanks
Stephen



Timedelay

ActiveChart.SetSourceData Source:=Sheets("IQAF").Range("J2:U2,J5:U5"),
PlotBy:=xlRows

Timedelay

ActiveChart.SetSourceData Source:=Sheets("IQAF").Range("J2:U2,J6:U6"),
PlotBy:=xlRows

Timedelay

ActiveChart.SetSourceData Source:=Sheets("IQAF").Range("J2:U2,J7:U7"),
PlotBy:=xlRows

....
....
....
....
 
T

Tom Ogilvy

for i = 5 to 100
ActiveChart.SetSourceData Source:=Sheets("IQAF").Range("J2:U2,J" & _
i & ":U" & i), PlotBy:=xlRows
Application.Calculate
Wait Now + timevalue("0:0:10")
Next i
 

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

Top