Below is my code... I recorded a macro which works fine and does what I want if I click run macro, but then I tried making it execute after a change is made to the active sheet and I get an error: "Compile error: Ambiguous name detected: Worksheet_Change"
I think that I am doing something really fundamentally wrong like (ByVal Target As Range) is not correct.... I'm not really sure what I need in the parentheses after Private Sub Worksheet_Change(???).
Thanks!
Private Sub Worksheet_Change(ByVal Target As Range)
ActiveSheet.ChartObjects("Chart 243").Activate
ActiveChart.ChartArea.Select
ActiveChart.SetSourceData Source:=Sheets("setup-smry").Range("=OFFSET('setup-smry'!$B$224,0,0,1+MAX('setup-smry'!$B$140:$AE$140),30)"), _
PlotBy:=xlRows
End Sub
I think that I am doing something really fundamentally wrong like (ByVal Target As Range) is not correct.... I'm not really sure what I need in the parentheses after Private Sub Worksheet_Change(???).
Thanks!
Private Sub Worksheet_Change(ByVal Target As Range)
ActiveSheet.ChartObjects("Chart 243").Activate
ActiveChart.ChartArea.Select
ActiveChart.SetSourceData Source:=Sheets("setup-smry").Range("=OFFSET('setup-smry'!$B$224,0,0,1+MAX('setup-smry'!$B$140:$AE$140),30)"), _
PlotBy:=xlRows
End Sub