View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Alan Beban[_2_] Alan Beban[_2_] is offline
external usenet poster
 
Posts: 783
Default 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