Changing the Chart Data

rudevincy

Active Member
Joined
Feb 21, 2005
Messages
417
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

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
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"
 
Upvote 0

Forum statistics

Threads
1,224,396
Messages
6,178,394
Members
452,844
Latest member
Shebl

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
Back
Top