So I have a sheet called “Dashboard” that I have several charts on, but every week I’m adding data to the tables these charts are based on. The second sheet that has the data for this table is “Historical Totals” and the data I want is in columns A through E (this includes labels and headers). I’m trying to automate the charts updating, and I don’t quite know why this isn’t working. Here is the code I have so far:
Sheets("Dashboard").Select
ActiveSheet.ChartObjects("Chart 4").Activate
ActiveChart.SetSourceData Source:=Sheets("Historical Totals").Range("A1", Range("E1").End(xlDown))
I’ve tried seperating our the range, and it is selecting the appropriate data, so I don’t really know where I’m making the mistake.
try the following. You need to reference the data sheet every time you use Range: