davidhall80
Well-known Member
- Joined
- Jul 8, 2006
- Messages
- 663
Is it possible to change the "Sheet1" in my code to whatever the active sheet name is. I'm producing charts for several tabs and each has a different tab name. Any recommendations. Also any recommendations on simplifying this code. Thanks guys!!...
Set chart = Range("C8:E8").Resize(Range("C" & Rows.Count).End(xlUp).Row - 7)
Range(chart, chart).Select
Charts.Add
ActiveChart.ChartType = xlBarClustered
ActiveChart.SetSourceData Source:=Sheets("Sheet1").Range(chart, chart), PlotBy :=xlColumns
ActiveChart.Location Where:=xlLocationAsObject, Name:="Sheet1"..
Set chart = Range("C8:E8").Resize(Range("C" & Rows.Count).End(xlUp).Row - 7)
Range(chart, chart).Select
Charts.Add
ActiveChart.ChartType = xlBarClustered
ActiveChart.SetSourceData Source:=Sheets("Sheet1").Range(chart, chart), PlotBy :=xlColumns
ActiveChart.Location Where:=xlLocationAsObject, Name:="Sheet1"..