A macro that makes a (line) graph move (update) ..

JamesKM

Board Regular
Joined
Aug 12, 2002
Messages
130
for incremental values of 1 to 100.

I thought Walkenback's book would help (and the attached CD) but I cannot work out what to do -

I have a graph in sheet (graph) and the data in sheet (data).
Cell named "DayRate" is the variable I want to change from 1 to 100 and view the graph moving through the 100 points.

I have:
__________________
Sub StartMove()
On Error Resume Next
Range("DayRate") = 0
For i = 1 To 100
Range("DayRate") = Range("DayRate") + 1 / 100
Next i
Range("DayRate") = 0.5
End Sub
______________________________
in module 1 and
_______________________
Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)

End Sub
__________________________________

in the graph worksheet, but running the macro does not work.

Please help.

Thanks in advance,
James
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!

Forum statistics

Threads
1,203,566
Messages
6,056,110
Members
444,846
Latest member
pbailey

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top