Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Dim oChart as Chart, oChartObj as ChartObject
[highlight yellow]
Set oChart = Charts.Add
With oChart
.ApplyCustomType ChartType:=xlBuiltIn, TypeName:= _
"Line - Column on 2 Axes"
.SetSourceData Source:=Sheet1.Range( _
"D1:E3"), PlotBy:=xlColumns
.Location Where:=xlLocationAsObject, Name:="Sheet2"
End With[/highlight]
[b]'at this point the Chart Object has become a ChartObject Object[/b][highlight #FF99FF]
With ActiveSheet
Set oChartObj = .ChartObjects(.ChartObjects.Count)
End With
With oChartObj.Chart
.HasTitle = True
.ChartTitle.Characters.Text = "My Title"
.Axes(xlCategory, xlPrimary).HasTitle = False
.Axes(xlValue, xlPrimary).HasTitle = True
.Axes(xlValue, xlPrimary).AxisTitle.Characters.Text = "My Pri Axis"
End With[/highlight]