PDA

View Full Version : Solved: select plot area sheet using cell reference



khalid79m
03-16-2007, 03:11 AM
ActiveChart.SetSourceData Source:=Sheets("JANUARY").Range("A10030").CurrentRegion, _
PlotBy:=xlColumns


ActiveChart.SetSourceData Source:=Sheets("" & Range("A10001").Value).Range("A10030").CurrentRegion, _
PlotBy:=xlColumns


The first line of code selects sheet january however I am doing monthly reports so rather than have 12 different scirpts i am trying to get it to use a cell refernce to dictate which sheet to plot from, the second code is my feeble attempt to do this but guess what it doesnt work , can this be done ? have i made a simple error ? please help