OaklandJim
Well-known Member
- Joined
- Nov 29, 2018
- Messages
- 855
- Office Version
- 365
- Platform
- Windows
Here are relevant portions of code:
The .Name part gives me Run-time Error 7: Out of Memory. How do I name a chart in vba?
VBA Code:
Dim wsData As Worksheet
Dim cResults As Chart
Set wsData = ThisWorkbook.Worksheets("Sheet1") '<= worksheet containing data
Set cResults = wsData.Shapes.AddChart.Chart
With cResults
'
.ChartType = xlBarClustered
.SeriesCollection.Add Source:=rDataSeries
' This causes an out of memory error.
.Name = "ECR Counts"
End With
The .Name part gives me Run-time Error 7: Out of Memory. How do I name a chart in vba?