This example sets the name of the specified chart.
ChartSpace1.Charts(0).Name = "Line Chart"
After the chart name has been set, you can refer to the chart by name, as shown in the following example.
ChartSpace1.Charts("Line Chart").HasLegend = True