Hello,
can anyone tell me if there's a way to add help text to a user-defined function, so it is visible when clicking INSERT - FUNCTION?
Thanks.
Hello,
can anyone tell me if there's a way to add help text to a user-defined function, so it is visible when clicking INSERT - FUNCTION?
Thanks.
I don't know if this is exactly what you want, but here's what I've done for my UDF's:
1) From VBA editor, open object browser.
2) Find UDF name and right click -> select properties
3) One of the text boxes in this dialog is called "description" Put your desired text in that box.
I don't know that you'll have enough text to completely describe how to use the function, but it would be enough to help someone who's already familiar with how to use it.
It's not quite what I was looking for.![]()
I was hoping I could change the "No help available" text, displayed in the "Function Arguments" dialog box that pops up when accessing the UDF by: INSERT - FUNCTION - CATEGORY - USER DEFINED ... etc.
Do I need to create a help file for this? If so, where would I insert it?![]()
Thanks again.
You can use Windows API call. But that is not simple.
HTH
Myles
...constantly looking for the smoother pebble while the whole ocean of truth lies before me.
I've tried this a few times and sometimes it works and sometimes the new desicription does not appear. Do you have any ideas why this could be and how I can fix it? It gets a bit tedious entering the same description again and again.Originally Posted by MrShorty
Thanks
Good afternoon MalcolmK
...and welconme to the forum!
A word of advice, in future if you're going to ask questions, you have more chance of a reply if you start a thread of your own for the question, rather than tack it on to the end of someone elses.
To answer your question, why not use code to do it? Go to the VBE and press Ctrl + g to open the immediate window and type in :
When you save the workbook, this information will be saved with your UDF.![]()
Please Login or Register to view this content.
HTH
DominicB
Please familiarise yourself with the rules before posting. You can find them here.
Hi DominicB
Thanks for the help
You can do this before you write your UDF,
Go to Tools>Macro>Record New Macro.
In the Description box, type a description for your UDF. Type the name of your UDF and click Ok.
Now Stop recording.
Open the VBE (Alt+F11) and replace the word "Sub" with "Function"
Add your Function arguments as normal.
Hope that helps.
RoyUK
--------
For Excel Tips & Solutions, free examples and tutorials why not check out my web site
Free DataBaseForm example
Your post does not comply with Rule 2 of our Forum RULES. Don't post a question in the thread of another member -- start your own thread. If you feel it's particularly relevant, provide a link to the other thread.
Everyone who confuses correlation and causation ends up dead.
How annoying, that last question was exactly what I came to this thread to find...
15 years too late, but this thread is still high in the list for search term 'excel vba function parameters help text', so somebody might find this useful.
dominicb's solution with the works for the general description, but as far as I could figure out, not for the help text for each parameter.
This is because the help text for the parameters must be given as an array of strings, one for array item for each parameter, and I couldn't see any way to do that in the immediate window.
So I saved the following Sub in 'Modules':
F5 or the green arrow button to run, and your help text should now be visible in your function arguments input box![]()
Please Login or Register to view this content.
**EDIT**
...and 25 minutes later I discover how to enter an array in the immediate window:
![]()
Please Login or Register to view this content.
Last edited by camaraneo; 02-26-2021 at 12:40 PM. Reason: Additional Info
[QUOTE=camaraneo;5479295]15 years too late, but this thread is still high in the list for search term 'excel vba function parameters help text', so somebody might find this useful.
Indeed after 15 years this subject is not yet dead !
Thank you for your answer it helps me.
I would have a follow up question :
"Is there a way to show the ArgumentDescriptions while the user is typing a custom function ? Without having to open the fx box.
For excel buildin fuctions the description of each arguments does appear when you start typing the fuction arguments."
I looked into this at the time I was trying to figure out the above. Ultimately, the effort required to make it work was greater than I was prepared to put into it, with third-party tools needing installed etc.Is there a way to show the ArgumentDescriptions while the user is typing a custom function ? Without having to open the fx box.
For excel buildin fuctions the description of each arguments does appear when you start typing the fuction arguments.
I can't link because I'm new to the forum, but there's a stackoverflow thread that has good info. Try "How to put a tooltip on a user-defined function" in your preferred search engine and the thread should appear.
EDIT: also try searching for "github excel-dna intellisense"
Last edited by camaraneo; 03-26-2021 at 08:44 AM. Reason: Additional Info
[QUOTE=sthoAL;5492690] Administrative Note:
Welcome to the forum.
We are happy to help, however whilst you feel your request is similar to this thread, experience has shown that things soon get confusing when answers refer to particular cells/ranges/sheets which are unique to your post and not relevant to the original.
Please see Forum Rule #4 about hijacking and start a new thread for your query.
If you are not familiar with how to start a new thread see the FAQ: How to start a new thread
1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
2. If your question is resolved, mark it SOLVED using the thread tools
3. Click on the star if you think someone helped you
Regards
Ford
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks