The accolade for your "WTF" method, as you describe, belongs to Laurent
Longre, see here
http://xcell05.free.fr/english/index.html
The method is limited to 255 characters of help text in total for the
description and all the arguments.
KeepItCool discovered a way to overcome the 255 limit. It is based on
Laurent's method but with clever use of names, see demo here
http://www.jkp-ads.com/Articles/RegisterUDF00.htm
Unless or until you fully understand the demo use it as-is, but find
alternative API function names to those used in the demo. Later you may find
the code can be usefully adapted to your needs, but If you get something
slightly wrong you may crash Excel. If you are using automation addin
functions, as became available for use in XL2002, the intrinsic method can
also be used with the code in your own app, though function names will
appear twice in the function wizard.
If you have your own .Net/C# "ordinary" dll you might just as well include
some dummy functions for use with the above methods (instead of say calling
User32.dll).
You can to link to a chm help file without either of the above. Also you can
include 2-3 lines (depending on XL version) of help text to appear in the
function wizard (but not text for each argument). The help link and text can
be added by selecting the function in Object browser, rt-click, properties.
With simple functions the "description" text alone might be enough without
resorting to the methods above. Have a go with that first.
AFAIK there are no other approaches to include help text in the function
wizard.
Regards,
Peter T
"Jack Hoxley [MVP]" wrote in
message ...
Morning all,
Just a quick post to request some best-practice advice as to what my
options
might be. I've been digging around MSDN for a while and haven't found any
promising leads yet.
In a nutshell I want some VBA (or C#) code for Excel 2003 where I can
store
help text that appears in the function helper window - e.g. function
description, category and parameter name/description.
I found the following two articles:
http://www.dailydoseofexcel.com/arch...on-with-excel/
http://www.bettersolutions.com/excel...N723710331.htm
But they cause strange errors whereby our UDF's aren't always called. I
did
some digging, and found
http://msdn.microsoft.com/en-us/library/bb687900.aspx
which left me confused as to how the aforementioned code is ever supposed
to
work. It strikes me that the oft repeated fragments online are nothing but
fugly hacks. Who's smart idea was it to try and pull out User32.dll calls
and
re-alias them as other VBA functions?! A true "WTF".
Does anyone know of any other approaches to exposing intellisense-style
information to the end-users of our Excel Addin? Can VSTO somehow do it
directly from within the .NET/C# code maybe?
Any suggestions or advice are appreciated,
Jack