guiltyberto
New Member
- Joined
- Jul 22, 2014
- Messages
- 23
I keep getting this weird error: "Method 'Values' of object 'Series' failed" I don't know what is causing it, but here is my code:
Thanks in advance!
I also occasionally get the error "Automation error, the object invoked has disconnected from it's clients" if someone could explain what that means/show me what's causing it that would be pretty awesome too.
Code:
Private Sub initChart(filename)
Dim monthName As String
Dim monthRange As Range
monthName = getMonthName(filename)
Set monthRange = getMonthRange(filename)
getLabels (filename)
Set foreChart = Charts.Add
With foreChart
.ChartType = xlColumnClustered
.Location where:=xlLocationAsNewSheet, Name:="Forecast Chart"
.SeriesCollection.NewSeries
.SeriesCollection(1).Name = monthName
'MsgBox ("Got here 1")
.SeriesCollection(1).Values = monthRange 'error here
.SeriesCollection(1).XValues = monthLabels
.HasTitle = True
.ChartTitle.Text = "forecast chart"
End With
End Sub
Thanks in advance!
I also occasionally get the error "Automation error, the object invoked has disconnected from it's clients" if someone could explain what that means/show me what's causing it that would be pretty awesome too.
Last edited: