ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   VBA Problem going from Excel 2003 to Excel 97 (https://www.excelbanter.com/excel-programming/305960-vba-problem-going-excel-2003-excel-97-a.html)

RyanVM[_7_]

VBA Problem going from Excel 2003 to Excel 97
 
OK, this one has me extremely perplexed. I've got this line in a macr
I'm working on
Code
-------------------
Slope = Application.WorksheetFunction.Index(Application.Wo rksheetFunction.LinEst(Range("C" & MinRow & ":C" & MaxRow), Range("B" & MinRow & ":B" & MaxRow)), 1, 1
-------------------
Where Slope is a Double and MinRow & MaxRow are both Integers (assigne
values prior to this line).

This code worked perfectly in Excel 2003 on my home computer las
night, but when I took it back to work today and tried to run the macr
in Excel 97, I get the following error
Code
-------------------
Unable to get the LinEst property of the WorksheetFunction clas
-------------------
Why would this code work fine in Excel 2003 but not Excel 97

--
Message posted from http://www.ExcelForum.com


RyanVM[_8_]

VBA Problem going from Excel 2003 to Excel 97
 
Tom Ogilvy wrote:
*I must be missing something. Slope takes the same arguments a
LINEST.

--
Regards,
Tom Ogilvy* Given the fact that you know a lot more about this stuff than I do

it's probably I that's missing something.

In fact, now that I look at the documentation for the SLOPE() function
it would appear that such is the case! I'm going to switch the macr
over to the SLOPE() function since I'd imagine it's considerably faste
since it's not doing all of the other LINEST() calculations

--
Message posted from http://www.ExcelForum.com


RyanVM[_9_]

VBA Problem going from Excel 2003 to Excel 97
 
Just letting you know that switching it over proved successful, an
speed optimizations are always appreciated

--
Message posted from http://www.ExcelForum.com



All times are GMT +1. The time now is 11:59 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com