Greetings,
I am receiving a compile error expected: = message after trying to set the source data range for an xyscatter chart type on the line below. I would like to use data ranges from another workbook "COMM_COMBINED.xls" and a worksheet by the worksheet variable name zz.
The above line exists within the context of the below script:
Thanks!
I am receiving a compile error expected: = message after trying to set the source data range for an xyscatter chart type on the line below. I would like to use data ranges from another workbook "COMM_COMBINED.xls" and a worksheet by the worksheet variable name zz.
Code:
ch.SetSourceData (Workbooks("COMM_COMBINED.xls").Worksheets(zz).Range(Cells(3,b),Cells(yy,b)) , Workbooks("COMM_COMBINED.xls").Worksheets(zz).Range(Cells(3,a),Cells(yy,a)))
The above line exists within the context of the below script:
Code:
Set ch = Workbooks("COMM_Regress.xls").Worksheets(zz & "_C").Charts.Add
ch.Name = Workbooks("COMM_COMBINED.xls").Worksheet(zz).Cells(2, a).Value & Workbooks("COMM_COMBINED.xls").Worksheet(zz).Cells(2, b).Value
ch.ChartType = xlXYScatter
ch.SetSourceData (Workbooks("COMM_COMBINED.xls").Worksheets(zz).Range(Cells(3,b),Cells(yy,b)) , Workbooks("COMM_COMBINED.xls").Worksheets(zz).Range(Cells(3,a),Cells(yy,a)))
Thanks!