OaklandJim
Well-known Member
- Joined
- Nov 29, 2018
- Messages
- 855
- Office Version
- 365
- Platform
- Windows
Embedded charts are a bit tricky for me to learn. I suspect that I'll be asking a few questions. How do set the caption of a chart. Code I have is below.
VBA Code:
Set cResults = wsData.Shapes.AddChart.Chart
With cResults
.Parent.Name = "ECR Counts"
'
.ChartType = xlColumnClustered
.SetSourceData Source:=wsData.Range("B2:F3")
' This fails
' .Caption = "ECR Counts"
.Axes(xlValue).MajorUnit = 1
End With