title: Pie Chart Data Labels in Excel 2003 VBA
body: <p>I've run into a very strange problem with data labels in pie charts on Excel 2003. I'll set the .Top or .Left property of a data label absolutely in VBA, but Excel will automatically move it to a different value. Why does this happen? How can I work around this? This problem does <em>not</em> exist in Excel 2007, it seems, from my testing. To see what I mean, try creating a pie chart with data labels in excel 2007, and run the following function on the chart:</p>
  
  <pre><code>Sub problemExample(xlcht As Excel.Chart)
  
  With xlcht.SeriesCollection(1)
  
      For aSlice = 1 To .Points.Count
          .Points(aSlice).DataLabel.Top = 43
          Range("F" &amp; (aSlice + 1)).Value = .Points(aSlice).DataLabel.Top
          .Points(aSlice).DataLabel.Left = 38
          Range("G" &amp; (aSlice + 1)).Value = .Points(aSlice).DataLabel.Left
      Next aSlice
  End With
  End Sub
  </code></pre>