NewOrderFac33
Well-known Member
- Joined
- Sep 26, 2011
- Messages
- 1,283
- Office Version
- 2016
- 2010
- Platform
- Windows
Good afternoon,
I'm attempting to re-use some code that I've used successfully previously to define the ranges to be used by a chart embedded in a worksheet.
However, when it hits the line I've marked with an asterisk, the code stops with the error "Run-time error '1004': Invalid Parameter
All the named ranges exist and they are all the same size.
Can anyone suggest where I might be going wrong?
Thanks in advance
Pete
However
I'm attempting to re-use some code that I've used successfully previously to define the ranges to be used by a chart embedded in a worksheet.
Code:
Dim Chart_Modal As Chart
Set Chart_Modal = ModalSheet.ChartObjects("HR_Modal").Chart
'Sets the Modal chart based on the Col_HR_CAPI_ ranges + defines legend.
Chart_Modal.SetSourceData Source:=Range("XLabels,RangeA,RangeB,RangeC,RangeD,Range5")
Chart_Modal.SeriesCollection(1).Name = "=""A"""
Chart_Modal.SeriesCollection(2).Name = "=""B""" *
Chart_Modal.SeriesCollection(3).Name = "=""C"""
Chart_Modal.SeriesCollection(4).Name = "=""D"""
Chart_Modal.SeriesCollection(5).Name = "=""E"""
All the named ranges exist and they are all the same size.
Can anyone suggest where I might be going wrong?
Thanks in advance
Pete
However
Last edited: