Hello, I have a complex but simple request for help.
I have some data I wish to populate onto a graph which has limited axis of:
X axis = -5 to 5
Y axis =-5 to 85
(Please see attached image as an example)
I wish to plot 2 series of co-ordinates onto the graph, with joint line.
In total there are 4 sheets of data, each containing 20 columns of data:
(X1, Y1, and X2, Y2).
After plotting the first row of both co-orrdinates i wish to overwrite the series of data with the next row after 0.5 milli seconds until the specified number of rows is achieved.
Here are some of the things I've looked into:
SeriesCollection.Delete
<code style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif; vertical-align: baseline; white-space: inherit;">Sub GraphTest()
Dim xaxis As Range
Dim yaxis As Range
Dim fullRange As Range
Dim topcell As Range
Set xaxis = Range("$B$26", Range("$B$26").End(xlDown))
Set yaxis = ActiveSheet.Buttons(Application.Caller).TopLeftCell
Set yaxis = Range(Cells(yaxis.Row, yaxis.Column).Offset(2, 0), Cells(yaxis.Row, yaxis.Column).Offset(2, 0).End(xlDown))
Set topcell = ActiveSheet.Buttons(Application.Caller).TopLeftCell
Set fullRange = Union(xaxis, yaxis)
fullRange.Select
topcell.Activate
ActiveSheet.Shapes.AddChart.Select
ActiveChart.ChartType = xlLine
ActiveChart.SetSourceData Source:=fullRange
End Sub()</code>
[/IMG]
[/IMG]
I have some data I wish to populate onto a graph which has limited axis of:
X axis = -5 to 5
Y axis =-5 to 85
(Please see attached image as an example)
I wish to plot 2 series of co-ordinates onto the graph, with joint line.
In total there are 4 sheets of data, each containing 20 columns of data:
(X1, Y1, and X2, Y2).
After plotting the first row of both co-orrdinates i wish to overwrite the series of data with the next row after 0.5 milli seconds until the specified number of rows is achieved.
Here are some of the things I've looked into:
SeriesCollection.Delete
<code style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif; vertical-align: baseline; white-space: inherit;">Sub GraphTest()
Dim xaxis As Range
Dim yaxis As Range
Dim fullRange As Range
Dim topcell As Range
Set xaxis = Range("$B$26", Range("$B$26").End(xlDown))
Set yaxis = ActiveSheet.Buttons(Application.Caller).TopLeftCell
Set yaxis = Range(Cells(yaxis.Row, yaxis.Column).Offset(2, 0), Cells(yaxis.Row, yaxis.Column).Offset(2, 0).End(xlDown))
Set topcell = ActiveSheet.Buttons(Application.Caller).TopLeftCell
Set fullRange = Union(xaxis, yaxis)
fullRange.Select
topcell.Activate
ActiveSheet.Shapes.AddChart.Select
ActiveChart.ChartType = xlLine
ActiveChart.SetSourceData Source:=fullRange
End Sub()</code>