开发者

How can you retrieve a signature of function usable in Excel in VBA or a DLL?

开发者 https://www.devze.com 2022-12-20 05:50 出处:网络
When you type a function and press CTRL + SHIFT + A, you get a completion in Excel for the rest of the arguments.

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消