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!
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).

pgc01

MrExcel MVP
Joined
Apr 25, 2006
Messages
19,887
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"
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,163,777
Messages
5,833,643
Members
430,221
Latest member
jmmccormick

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