Hey again,
I am trying to create a chart that automatically refreshes depending on a value selected from a listbox1.
Both listbox1 and chart are on sheet1
Listbox contains list of names from sheet "Fee Earning Stats"
In this sheet, beside each name is 6 columns of data
Is it possible to have the chart on sheet1 refresh each time I click a name in the listbox1.
The code would probably have to store the selected listbox value, search through the "Fee Earning Stats" sheet for that name and select the 6 columns beside that particular name.
Is this possible??
My VBA is starting to get better but charting in code is still a mystery.
Below is an example of code where I manually selected 6 columns of data for a name selected in the listbox
[vba]ActiveSheet.ChartObjects("Chart 77").Activate
ActiveChart.SeriesCollection(1).Select
ActiveChart.SeriesCollection(1).XValues = "='Fee Earning Stats'!R5C5:R5C10"
ActiveChart.SeriesCollection(1).Values = "='Fee Earning Stats'!R30C5:R30C10"
ActiveChart.SeriesCollection(2).XValues = "='Fee Earning Stats'!R5C5:R5C10"
ActiveChart.SeriesCollection(2).Values = "='Non Fee Earning Stats'!R30C5:R30C10"
ActiveWindow.Visible = False
Windows("Book1.xls").Activate[/vba]