I
i.sobha
Hi,
I had written a vb code to create multiple charts in a single Excel
sheet.
The issue which I face is that in a single sheet the charts are
getting formed ( 9 charts in a single sheet) but all the charts appear
exactly one above the other. (t seems like only one chart is
generated) I am not able to position them such that they are placed
evenly.
Please find the code used to add charts to a sheet
The below code was placed in a loop to produce 9 charts in the sheet
'Sheet12"
With xlwCust.Charts.Add
.SetSourceData Source:=xlsCust.Range("A1:" & strCellRef),
PlotBy:=xlColumns
.ChartType = xlLine
.HasTitle = False
.Axes(xlCategory, xlPrimary).HasTitle = False
.Axes(xlValue, xlPrimary).HasTitle = True
.Axes(xlValue, xlPrimary).AxisTitle.Characters.Text =
"Percentage"
.Legend.Position = xlLegendPositionBottom
.ChartType = xlLine
.SizeWithWindow = True
.Location Where:=xlLocationAsObject, Name:="Sheet12"
End With
Please could somebody help.
Thanks and Regards,
Sobha
I had written a vb code to create multiple charts in a single Excel
sheet.
The issue which I face is that in a single sheet the charts are
getting formed ( 9 charts in a single sheet) but all the charts appear
exactly one above the other. (t seems like only one chart is
generated) I am not able to position them such that they are placed
evenly.
Please find the code used to add charts to a sheet
The below code was placed in a loop to produce 9 charts in the sheet
'Sheet12"
With xlwCust.Charts.Add
.SetSourceData Source:=xlsCust.Range("A1:" & strCellRef),
PlotBy:=xlColumns
.ChartType = xlLine
.HasTitle = False
.Axes(xlCategory, xlPrimary).HasTitle = False
.Axes(xlValue, xlPrimary).HasTitle = True
.Axes(xlValue, xlPrimary).AxisTitle.Characters.Text =
"Percentage"
.Legend.Position = xlLegendPositionBottom
.ChartType = xlLine
.SizeWithWindow = True
.Location Where:=xlLocationAsObject, Name:="Sheet12"
End With
Please could somebody help.
Thanks and Regards,
Sobha