Hi all,
I am working on a dashboard and have set it so a user can select "YTD" (Year To Date) from a cell and up pops a chart ("Chart 48" to be exact) to show the YTD data which is fine.
I am trying to get it so that when the chart is made visible the data source is updated to only show the months from Jan to the current month.
At the moment the data range for this chart is Worksheets("DATAGRAPHS").Range("I4:K16") which is what I used when I made the chart.
The code I have tried to set the data is:
Note: LastMonth is the row number which is figured out before this line is executed - I've declared this as an integer![]()
ActiveSheet.ChartObjects("Chart 48").SetSourceData Source:=Sheets("DATAGRAPHS").Range("H4,J" & LastMonth)
Any help on this would be appreciated, searches for a solution myself have hit a dead end...
Thanks
Harribone
Bookmarks