variable for a series in a graph.
variable = Sheets("pick your range").Range("C16").Value
' cell C16 has the range as a string
Workbooks("my workbook").Sheets("graphs").Charts("Chart1").SeriesCollection(1).Values = variable
=> Runtime error 438:
Object doesn't support this property or method
What am I doing wrong? Please help
UPDATE:
I guess object SeriesCollection does not support value method.
OK. So I check what methods are available.
Solution in Excel VBA help:
Worksheets("pick range").Range("E20").Copy
'E20 contains the string for the range
Charts("Chart6").SeriesCollection.Paste
run-time error '9':
Subscript out of range
Has somebody an idea?
variable = Sheets("pick your range").Range("C16").Value
' cell C16 has the range as a string
Workbooks("my workbook").Sheets("graphs").Charts("Chart1").SeriesCollection(1).Values = variable
=> Runtime error 438:
Object doesn't support this property or method
What am I doing wrong? Please help
UPDATE:
I guess object SeriesCollection does not support value method.
OK. So I check what methods are available.
Solution in Excel VBA help:
Worksheets("pick range").Range("E20").Copy
'E20 contains the string for the range
Charts("Chart6").SeriesCollection.Paste
run-time error '9':
Subscript out of range
Has somebody an idea?