ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Variable number of parameters in Excel User Defined Function (https://www.excelbanter.com/excel-programming/402669-re-variable-number-parameters-excel-user-defined-function.html)

Tony Gravagno

Variable number of parameters in Excel User Defined Function
 
Try this method signatu
Object MyFunc(params Object[][,] YourCells)

You may find other useful info on this topic in my blog. If you get a
successful deployment, please let me know.



Tony Gravagno
Nebula Research and Development
remove.mungeNebula-RnD.com/blog/tech/2007/11/excel-tools5.html



ep wrote:

Hey All,

I'm writing a C# automation add-in for Excel 2003 and I need to be able to
pass in an undefined number of object parameters (ie noncontiguous cells) to
my UDF. This is achieved in VBA by using the ParamArray, but the C# params
doesn't seem to work.

Does anyone know a way I can do this without hardcoding in "optional"
parameters? Let me know if there's anything else that would be helpful to
know.

Thanks




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

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