Hi Valerio,
It's not clear from your question what you are trying to do. Maybe some more concrete example would make it easier to answer.
1) The Excel function wizard will display all the arguments of your function (except if you have too many arguments...). Your function could internally (not as a parameter) use static values from other types in your library in its calculation, or (if it is marked as IsMacroType-true) even read other parts of the sheet to use as part of the function calculation.
2) Instead of the 'system loading other parameters elsewhere', maybe your function can just read the values elsewhere, and not have them passed as parameters.
3) & 4) Excel doesn't have any other ways to customise the function wizard. You could make a ribbon button that pastes the function and some pre-filled parameters into the current cell, and then pops up the function wizard.
Functions that you mark with the IsMacroType=true attribute:
[ExcelFunction(IsMacroType=true)]
public double MyFunction() {...}
are able to _read_ other parts of the sheet safely (using the ExcelReference type).
Your functions cannot _write_ to other parts of the sheet easily or safely, though there are some advanced workarounds. You should rather use macros triggered by shortcut keys or a ribbon interface to trigger writing to the sheet.
Regards,
Govert
________________________________________
From: exceldna@googlegroups.com [exceldna@googlegroups.com] on behalf of valerioro...@mclink.net [valerioro...@mclink.net]
Sent: 16 March 2012 09:59 AM
To: Excel-DNA
Subject: [ExcelDna] Function wizard parameters
Hello Govert,
I have a few questions about function wizard.
1) Is there the possibility to call an Udf function with parameters
and get those parameters not in the pop-up? For example the parameters
could be static variables in my class, or cell values stored in cells
in the current excel worksheet.
2) If so, can I have a sort of mixed-wizard popup that let users
select one parameter in the usual way and the system loads the second
parameters elsewhere?
3) May I load in the wizard a default or suggested parameter value?
4) May I graphically interact with the graphic interface of the wizard
(buttons, text fields, etc.)?
Last,
do you have a link or suggestions on how to programmatically manage
interactions between Udf functions and Excel worksheet elements(cells,
ranges, etc.)? (The function wizard indeed interacts with the
worksheet). For example, I still don't if it is possible or thread-
safe to read or write cells value in the function body of my Ufd.
I've red through the forum but I'm still a bit confused about it.
Thanks a lot
Valerio