I have developed a excel UDF. One of the UDF parameters has known possible values (A, B, C). So instead of asking all my users to find out what the possible values are I want to provide a option1 (hyperlink) in excel function wizard just like the Bloomberg's BDH function as shown in the screenshot.
I know I have to somehow hook upto win32 api and override the call/window when the function wizard is invoked. When I look into SPY++ I see that there is a insert function window and function arguments window.
I have broken down the task at hand into 4 sub tasks:
- Subclass the window “Function Arguments” bosa_sdm_XL9
- Add hyperlink control to that subclassed window.
- Hook an event to open another control with available options for that parameter.
- Hook an event to populate the value back in subclassed window when the control is closed.
I think I can sub class a window using online documentation but need help with item# 2,3,4.
Could not find any good code samples or starters on stackoverflow/msdn. Has anyone accomplished this or a similar task? Please help.