title: Application-defined or object -defined error with active range
body: <p>I am using the VBA code below were SpRatings is the name of a named range (created with an offset formula that gives me a column of different heights depending on the number of items contained). When i was running this code with a non-active range, it seemed to work. Can somebody advise on how to fix it for it to work? </p>
  
  <p>I strictly need to have the for loop looping through an active range. </p>
  
  <pre><code>With ActiveChart
  
   Set Serpo = .SeriesCollection(11).Points
  
          'Save the number of points in chart to variable j
          j = Serpo.Count
  
          'Iterate though each point in current series
          For i = 1 To j
  
              'Enable data label for current chart point
              Serpo(i).ApplyDataLabels Type:=xlShowValue
  
              'Save cell reference to chart point
              Serpo(i).DataLabel.Formula = "=" &amp; Range("SpRatings").Cells(i).Address(ReferenceStyle:=xlR1C1)
              Serpo(i).DataLabel.Font.ColorIndex = 2
              Serpo(i).DataLabel.Position = xlLabelPositionInsideBase
          Next
  End With
  </code></pre>