Home
Forums
New posts
Search forums
Articles
Latest reviews
Search resources
Members
Current visitors
Newsgroups
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Home
Forums
Newsgroups
Microsoft Excel
Microsoft Excel Charting
Chart update using VBA
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Nigel, post: 11536383"] I have some code that set the range for two series charts on one worksheet. The charts are embedded on a worksheet, and the ranges xV, xX and xT are set within the code and are valid references pointing to the data required. My problem is I get 'Unable to set the values property of the series class' error when setting SeriesCollection(2), collection(1) works OK, I have tried setting SeriesCollection(2) to the range xV which I know works for SeriesCollection(1), so nothing wrong with the range. SeriesCollection(2) does exist in the chart and if I set the chart data range manually it works OK! I am obviously not applying the range correctly - please help. Dim mCh as ChartObject Dim xV as Range, xX as Range, xT as Range For Each mCh in ChartObjects ' code that sets xV, xX and xT removed for clarity mCh.Activate ActiveChart.SeriesCollection(1).Values = xV ActiveChart.SeriesCollection(1).XValues = xX ActiveChart.SeriesCollection(2).Values = xT '<==== error on this line Next [/QUOTE]
Verification
Post reply
Home
Forums
Newsgroups
Microsoft Excel
Microsoft Excel Charting
Chart update using VBA
Top