How can you retrieve a signature of function usable in Excel in VBA or a DLL?
When you type a function and press CTRL + SHIFT + A, you get a completion in Excel for the rest of the arguments.
For example, try to type, =SUM(, then开发者_Go百科 press CTRL + SHIFT + A, and you will get the following:
=sum(number1,number2,...)
My question is: how do you retrieve this signature from either VBA or a XLL, such as you can implement either your own function wizard or a macro to help input the data faster.
Anthony
If you don't declare your variables as variants, then the intellisense should kick in. i.e., instead of:
Dim X as object
Try
Dim X as excel.application
Then all the needed variables for that function will be shown to you in a yellow overlay.
It doesn't output the 'signature' to editable text like ctrl-shift-A does, but it serves the same purpose.
Use http://nxll.codeplex.com. Every add-in function is a first class object that you can query for this information.
精彩评论