Automate Graph Trend Lines

  • Thread starter Charles L. Phillips
  • Start date
C

Charles L. Phillips

Hello,
I am trying to reproduce:

How to Use Automation to Set Graph Trend Lines: http://support.microsoft.com/default.aspx?scid=kb;en-us;154581
I keep getting the following error:

"Identifier under cursor is not recognized"

I have highlighted the error section...

Function AddTrendLine()
Dim GraphObj As Object
Set GraphObj = Me![MyGraph].Object.Application.Chart
GraphObj.SeriesCollection(1).TrendLines.Add
GraphObj.SeriesCollection(1).TrendLines(1).Type = 3
End Function

Can/will someone tell what what I am doing wrong?

Thank You,
 
Top