Changing the Chart Data

rudevincy

Active Member
Joined
Feb 21, 2005
Messages
415
Hi,

I have created a worksheet called DLR1 and I have a few comboboxs with a chart. I want that when the user selects a value from combo box 3 the chart data changes based on their selection.

In the combobox3_Change I have the code

ActiveWorkbook.Worksheets("DLR1").ChartObjects("Chart 3").Activate
ActiveChart.SeriesCollection(1).Values = _
"=='Rpt Temp_V5.xlsm'!BR_POST"
ActiveChart.SeriesCollection(2).Values = _
"=='Rpt Temp_V5.xlsm'!BR_Pre"
ActiveChart.SeriesCollection(2).XValues = _
"=='Rpt Temp_V5.xlsm'!BRChartDates"

But I keep getting an application defined error..... is there something I am missing.... please help!
 

Some videos you may like

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest

pgc01

MrExcel MVP
Joined
Apr 25, 2006
Messages
19,881
Hi

I've just read the post and the first thing I see is that you have 2 "=" signs where you should only have 1. Please check.

Ex.

Code:
ActiveChart.SeriesCollection(1).Values = _
        "[SIZE=4][FONT=arial][B][COLOR=#a52a2a]==[/COLOR][/B][/FONT][/SIZE]'Rpt Temp_V5.xlsm'!BR_POST"
 

Watch MrExcel Video

Forum statistics

Threads
1,122,554
Messages
5,596,811
Members
414,104
Latest member
imamalidadashzada

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top