A
Ali Baba
I am getting a run -time error 1004 stating it is unable to set the XValues
Property of the Series Class. I don't know why!!!
I did some changes to the old code which was running fine but this code is
annoying me .
Can anybody help plz
Sub SelectCapacity()
Sheets("Numerical Integration").ChartObjects("ChartNumInteg").Activate
ActiveChart.PlotArea.Select
ActiveChart.ChartType = xlXYScatterSmoothNoMarkers
Select Case CapacityCombo.Value
Case "Exponential"
With ActiveChart
.SeriesCollection(1).XValues = "=AnalysisPageNI!R4C1:R100C1"
.SeriesCollection(1).Values = "=AnalysisPageNI!R4C2:R100C2"
.SeriesCollection(1).Name = "Capacity"
End With
Case "Gumbel"
With ActiveChart
.SeriesCollection(1).XValues = "=AnalysisPageNI!R4C1:R100C1"
.SeriesCollection(1).Values = "=AnalysisPageNI!R4C3:R100C3"
.SeriesCollection(1).Name = "Capacity"
End With
End select
End Sub
Property of the Series Class. I don't know why!!!
I did some changes to the old code which was running fine but this code is
annoying me .
Can anybody help plz
Sub SelectCapacity()
Sheets("Numerical Integration").ChartObjects("ChartNumInteg").Activate
ActiveChart.PlotArea.Select
ActiveChart.ChartType = xlXYScatterSmoothNoMarkers
Select Case CapacityCombo.Value
Case "Exponential"
With ActiveChart
.SeriesCollection(1).XValues = "=AnalysisPageNI!R4C1:R100C1"
.SeriesCollection(1).Values = "=AnalysisPageNI!R4C2:R100C2"
.SeriesCollection(1).Name = "Capacity"
End With
Case "Gumbel"
With ActiveChart
.SeriesCollection(1).XValues = "=AnalysisPageNI!R4C1:R100C1"
.SeriesCollection(1).Values = "=AnalysisPageNI!R4C3:R100C3"
.SeriesCollection(1).Name = "Capacity"
End With
End select
End Sub