Link to home
Create AccountLog in
Avatar of cations
cations

asked on

Adding a Trend line to a Series in a Graph in MS Access VBA

Hello Access Gurus

I want to add a trend line to my graph programatically.  This is how Excel does it but this syntax does not work in MS Access....  thank you so much.  


 Set chartobj = ![AnalysisGraph].Object.Application.Chart
 chartobj.SeriesCollection(1).Select
 chartobj.SeriesCollection(1).Trendlines.Add(Type:=xlLinear, Forward:=0, _
         Backward:=0, DisplayEquation:=False, DisplayRSquared:=False).Select
            chartobj.SeriesCollection(1).Trendlines(1).Select
 With Selection.Border
            .ColorIndex = 57
            .Weight = xlThin
            .LineStyle = xlDot
End With
Avatar of cations
cations

ASKER

No Solutions??
Avatar of cations

ASKER

  chartObj.SeriesCollection(1).Trendlines.Add Type:=xlLinear
ASKER CERTIFIED SOLUTION
Avatar of Computer101
Computer101
Flag of United States of America image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer