I want to develop a macro that counts the number of charts inside a specified range and then takes different actions based on the number. How would I change activesheet.chartobjects.count such that it only counts within a range rather than throughout the entire sheet?
Here's the skeleton of my code.
Sub chrt_chck()
Dim rng As Range
Dim x As Long
Set rng = Range("A1:F10")
x = ActiveSheet.rng.ChartObjects.Count
If x > 1 Then
'select and delete all charts in range
End If
If x = 1 Then
'select that chart and update format
Else
'create chart and set format
End If
End Sub