De: tom Ogilvy Objet: Re: Using WorksheetFuntion LINEST() Date : mardi 19 octobre 1999 00:36 Here is a start: Sub TESTER2() dim arrCoef dim arrXval arrXval = Evaluate("A1:A6 ^{1, 2, 3}") arrCoef = application.LinEst(range("B1:B6"), arrXval, true, true) for i = LBound(arrCoef, 2) to ubound(arrCoef, 2) Debug.Print i, arrCoef(1, i) next end Sub This prints the coefficients. the statistics are also in the array. The first dimension is 1 to 5, and the statistics are in 2 - 5. HTH, tom Ogilvy MVP Excel G.Miller wrote in message news:u5IFeBbG$GA.63@cppssbbsa04... > I have created a program (Excel 97) that plots 2nd-6th order curves for > points of data that entered in a userform. > Currently, the data entered is linked to ranges on a worksheet via the > linked Cell property. The LINEST worksheet function is then setup (on the > worksheet) and the output is then used to plot the curves on a chart. > What I would like to do is call the LINEST function in VB. Can anyone > provide me with at least the LINEST format for VB? > > Any help is appreciated. > > Thanks, > Geoff > >