Hello,
I have never coded in visual basic before. I am trying to create a macro that will graph a ton of data. I made a quick program using the "record" function, then tried to mess with it to get the rest of the data graphed.
This is what I have come up with so far:
I'm getting an error where I try and move the X and Y values down a couple of lines to the next set of data. Am I not calling the variables correctly? Im not sure whats wrong.
Any information is appreciated.
Thanks.
I have never coded in visual basic before. I am trying to create a macro that will graph a ton of data. I made a quick program using the "record" function, then tried to mess with it to get the rest of the data graphed.
This is what I have come up with so far:
VBA Code:
Sub Graphing2()
'
' Graphing2 Macro
'
'
Let a = 176
Let b = 126
Let y = 3
Let x = 0
Do While x < 225
ActiveSheet.ChartObjects("Chart 1").Activate
Application.CutCopyMode = False
Application.CutCopyMode = False
Application.CutCopyMode = False
ActiveChart.SeriesCollection.NewSeries
ActiveChart.FullSeriesCollection(2).Name = "=""Unit y"""
ActiveChart.FullSeriesCollection(2).XValues = "=Sheet1!$B$a:$B$b"
ActiveChart.FullSeriesCollection(2).Values = "=Sheet1!$E$a:$E$b"
x = x + 1
y = y + 1
a = a + 67
b = b + 67
Loop
End Sub
I'm getting an error where I try and move the X and Y values down a couple of lines to the next set of data. Am I not calling the variables correctly? Im not sure whats wrong.
Any information is appreciated.
Thanks.