Create a Chart with VBA in Excel. Create a Chart with VBA in Excel. Add Chart title. Select location for your chart. Add axis labels. Select the type of chart that you require.
Dim chtChart As Chart
'Create a new chart.
Set chtChart = Charts.Add
Set chtChart = chtChart.Location(Where:=xlLocationAsObject, Name:="Sheet1")
'.Name = ""
.ChartType = xlColumnClustered
'Link to the source data range.
.SetSourceData Source:=Sheets("Sheet1").Range("a2:b7"), _
.HasTitle = True
.ChartTitle.Text = "Sales by Customer"
.Axes(xlCategory, xlPrimary).HasTitle = True
.Axes(xlCategory, xlPrimary).AxisTitle.Characters.Text = "Customer"
.Axes(xlValue, xlPrimary).HasTitle = True
.Axes(xlValue, xlPrimary).AxisTitle.Characters.Text = "Total Sales"
For more help visit my website http://www.easyexcelanswers.com or email me at firstname.lastname@example.org.
I can customize this Excel application for your exact needs for a fixed price of $50. The work is normally returned within 24hrs.
I am able to provide online help on your computer at a reasonable rate.
MY videos are all created on Camtasia.
Follow me on Facebook
Tags: Create a Chart with VBA in Excel, Create a Chart with VBA in Excel, Add Chart title, Select location for your chart., Add axis labels, Select the type of chart that you require., microsoft visual basic, add axis labels in excel 2016