How to register a function without arguments?

Jul 5, 2014 at 7:22 AM
I am trying to register a function that doesn't have any arguments, but I can not find which value to use for the argument_text parameter. The following did not work, a still get a field for entering the argument in Excel's function wizard:
static AddIn xai_Status("?xll_Status", XLL_CSTRING, "System_Status", "", "Test Group", "Inserts the system status. ");
Any help appreciated!
Jul 5, 2014 at 11:33 AM
You are telling Excel that your function returns a null terminated string and has no arguments. The Excel function wizard will show that it takes one argument even though it doesn't. You should still be able to call the function.
Jul 5, 2014 at 11:40 AM

But how can I tell the Excel function wizard that the function doesn't take any argument?
Jul 5, 2014 at 12:21 PM
You did. It is just ignoring you. Excel is Excel.
Jul 8, 2014 at 12:07 PM
This is a long-standing Excel bug.

If you are able to register the function with no description at all, you should not see the incorrect extra argument control in the function wizard.
There's no way to have both a function description and no argument control.
Jul 8, 2014 at 12:44 PM
Thanks govert.