Hi Farhan,
Your plan 2. will be hard to make work. Mixing Excel-DNA and VSTO in
one add-in is not really possible.
However, you could certainly use the Windows Forms designer in Visual
Studio to create forms that you display from your Excel-DNA add-in,
either as a pop-up window or as part of a Custom Task Pane. So using
the designer would apply to your option 1 too.
Depending on the complexity of your function arguments, you could
probably make something on a Ribbon that does this too - some text
boxes and dropdowns and a button to insert the function. I have no
experience doing this myself.
There is another option I should mention again here - using the dialog
support in the C API. This is tricky to make work - I posted some
pointers in the earlier discussion here:
https://groups.google.com/group/exceldna/browse_frm/thread/296059b2993bd468
One advantage of the C API dialogs is that you get a refedit control
that allows the users to point to and select a sheet region, just like
the regular function wizard.
-Govert
On Jun 29, 10:37 pm, Farhan Ahmed <
Far...@ycharts.com> wrote:
> Can you please share tips on how you accomplished this?
>
> I'm specifically looking for guidance on how to create a customized UI for
> the user to enter the parameters. If I understand correctly, there are a
> few options:
>
> 1. Write UI code (using Windows.Forms) from within the ExcelDNA add-in.*Nikee - Is this what you are doing?
> *
> 2. Use VSTO to create a COM-addin that implements the UI (can use the
> designer from within VS, which is nice) and then have the Excel Addin talk
> to it somehow. *I am trying this strategy but am stuck trying to get the
> ExcelDNA add-in to talk to the VSTO add-in. Any guidance here?*
> 3. Use the Custom UI interfaces in ExcelDNA to do everything. Not sure
> how flexible this is
>
> Any others I am missing?
>
>
>
>
>
>
>
> On Friday, June 29, 2012 12:15:01 PM UTC-5, Nikee wrote:
>
> > I have little bit similar situation; where I want to give Wizard to users
> > where they will select input parameters and values for each of parameters.
> > And this wizard will be available through one of the ExcelCommand which
> > will invoke WinForm; where user can select their options and then that data
> > will be pasted on current sheet. Which will become driver for calling
> > ExcelFunctions... Similar to Bloomberg add in...
>
> > I just though of sharing this; I would appreciate if you guys share your
> > experience and pros/cons of this approach
>
> > On Friday, June 29, 2012 11:22:19 AM UTC-4, Farhan Ahmed wrote:
>
> >> Has anyone here tried customizing the formula builder to provide the user
> >> options (e.g. drop down menu) for possible parameter choices?
>
> >> I have one generic function that takes a "code" as a parameter that tells
> >> the function what to compute. I could define a UDF per code, but it would
> >> explore pretty quickly (I have over 900 codes right now), so I'm trying to
> >> figure out how to assist the user in choosing the right codes through the
> >> formula wizard.
>
> >> Any ideas or suggestions are welcome.
>
> >> Thanks,
> >> Farhan