Hi everyone! Help!
I'm struggling with the following code. It works fine until you open another workbook, then I get a run-time error saying this line can't be found
[/pre]
The sub is called when a combobox changes.
Many thanks
I'm struggling with the following code. It works fine until you open another workbook, then I get a run-time error saying this line can't be found
Code:
Set cht = ActiveSheet.ChartObjects("Chart 19").Chart
The full code is:
[pre]Sub ColorChart()
Dim cht As Chart
Set cht = ActiveSheet.ChartObjects("Chart 19").Chart
Set objSeries = cht.SeriesCollection(1)
If Range("Colorcode").Value = 1 Then
objSeries.Interior.Color = RGB(142, 180, 227)
objSeries.Border.Color = RGB(85, 142, 213)
End If
(And there are a couple of more IFs until it ends)
End Sub
The sub is called when a combobox changes.
Many thanks