I am trying to automate some graphing in an excel workbook. The workbook has around 50 sheet all with various names i.e. K11, K12 ect.
I can make my macro work on individual sheets through a button that I have inserted. I would really like to copy the button (and attached macro) to work on any sheet. I am close but the last bit of code I am struggling with is:
"ActiveChart.SetSourceData Source:=Range("'K11'!$B$6:$B$76,'K11'!$AC$6:$AC$76" _
)"
This works on sheet 'K11'.
"ActiveChart.SetSourceData Source:=Range("ActiveSheet$B$6:$B$76,ActiveSheet$AC$6:$AC$76" _
)"
this is my attempt but doesn't work.....
I have used the ActiveSheet in other places in the code to replace K11 and it works great. Is there a way use 'ActiveSheet' to grab the range to graph?
Hope this makes..........
Thanks, you guys are great...
Bookmarks