ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   WorksheetFunction (https://www.excelbanter.com/excel-programming/402614-worksheetfunction.html)

Alan Beban[_2_]

WorksheetFunction
 
I have seen discussions of differences between

Application.[some worksheet function] and

Application.WorksheetFunction.[some worksheet function]

The main difference seems to relate to the handling of errors that are
thrown, but until recently I have never seen an instance in which the
two forms require different treatment of the parameters of the function.

Either Application.WorksheetFunction.Index(someRange, 0, 2) or
Application.Index(someRange, 0, 2) will return the second column of
someRange.

Application.Index(someRange, , 2) will also return that second column but
Application.WorksheetFunction.Index(someRange, , 2) will throw an
Argument not optional compile error message.

Are there other such differences?

Alan Beban


All times are GMT +1. The time now is 09:06 AM.

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