How to add options hyperlink into Excel Function A

2019-04-13 14:53发布

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:

  1. Subclass the window “Function Arguments” bosa_sdm_XL9
  2. Add hyperlink control to that subclassed window.
  3. Hook an event to open another control with available options for that parameter.
  4. 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.

0条回答
登录 后发表回答