Hi,
I want to create a chart in a specific sheet ("Problematic Stock") of a workbook ("Reports_1.xls"). I take the data from the workbook ( backbone = "Data_Backbone.xls") from the sheet "Problematic Stock".
I use the following code:
Error: 438 (at the bold line).
Could you please help me ?
Thanks,
Tzovanis
I want to create a chart in a specific sheet ("Problematic Stock") of a workbook ("Reports_1.xls"). I take the data from the workbook ( backbone = "Data_Backbone.xls") from the sheet "Problematic Stock".
I use the following code:
Code:
[SIZE=1]Workbooks.Open "C:\Logistics Container\Reports_1.xls"
Workbooks("Reports_1.xls").Activate
Worksheets("Problematic Stock").Activate[/SIZE]
[SIZE=1] With Charts.Add
.Name = "Test"
.ChartType = xlColumnClustered
[B] .SetSourceData Source:=Workbooks(backbone).Sheet("Data_Discont").Union(range(cells(4, 1), cells(inde + 3, 1)), range(cells(4, 12), cells(inde + 3, 12))), PlotBy:=xlRows
[/B] .HasTitle = True
.ChartTitle.Text = "=Problematic Stock!R1C2"
.Axes(xlCategory, xlPrimary).HasTitle = True
.Axes(xlCategory, xlPrimary).AxisTitle.Characters.Text = "Month"
.Axes(xlValue, xlPrimary).HasTitle = True
.Axes(xlValue, xlPrimary).AxisTitle.Characters.Text = "Sales"
End With[/SIZE]
Error: 438 (at the bold line).
Could you please help me ?
Thanks,
Tzovanis