How give VBA function more than 29 input arguments?

L

lancish

I am writing a financial planning application as a function that takes many
input variables, they went from 28 (which was fine) to 43 (I get error
message, which mean that only 29 inputs are allowed). How can I give the
function 43 inputs? VBA documentation says they should accept up to 60!
Thanks. ... Lancish
 
B

Bob Kilmer

VBA function (in code?) or worksheet function?

I don't know what the limits of args to a VBA Sub or Function is, but if the
number of args gets large, I would usually use a collection, array, string,
ParamArray, range or read from a stream (e.g., file) of some kind. Virtually
no limits.

If worksheet function, well, others are more adept.
 
C

Charles Williams

Assuming you are developing a worksheet function, 43 input variables would
present huge useability problems for users.
And Excel does not allow it anyway.

Use a small number of Range arguments that refer to large numbers of
adjacent cells instead.


Charles
______________________
Decision Models
FastExcel 2.1 now available
www.DecisionModels.com
 
Top