electricpete
Technical User
When a spreadsheet user invokes an "array" or "matrix" function, he has to highlight the entire output range and press ctrl-shift-enter.
VBA must return an array with the exact dimensions matching that output range, otherwise an error occurs.
Typically the problem parameters make it obvious how big it should be. BUT it would be nice to be able to check the size of the range (and possibly add padding to the output if needed to make it less burdensome on user to define exact correct size of output).
The question is how the vba function will determine the size of the output array that it has to deliver back to the spreadsheet.
During intitial call to the function, we could use "selection". But that is not guaranteed to work later on for example if user alters a cell which provides an input to the function, the function will recompute but it cannot look at "selection" to determine (check) size of output range.
Thanks
VBA must return an array with the exact dimensions matching that output range, otherwise an error occurs.
Typically the problem parameters make it obvious how big it should be. BUT it would be nice to be able to check the size of the range (and possibly add padding to the output if needed to make it less burdensome on user to define exact correct size of output).
The question is how the vba function will determine the size of the output array that it has to deliver back to the spreadsheet.
During intitial call to the function, we could use "selection". But that is not guaranteed to work later on for example if user alters a cell which provides an input to the function, the function will recompute but it cannot look at "selection" to determine (check) size of output range.
Thanks