Add Description of Variable for User-Defined Functions

J

Jonas

Does anybody know if it is possible to add descriptions of arguements
for user-defined functions? I am referring to the window that appears
when you choose a user-defined function; the "Function Arguments"
window.

I was able to add a description of the function but I haven't figured
out how to add a description for the arguements.
 
P

papou

Hello Jonas
You can add comments on your UDF very simply using the VBE Object Explorer:
When in VBE press F2 (to view the Object Explorer)
Select your project name from the top dropdown list (eg: VBAProject)
Right-click on your function in the "Global members" window
Select Properties
Add your comments and finsh with OK
Save your project
Return to Excel and insert your function, you should then be able to see
your comments in the Function argumenst window.

HTH
Cordially
Pascal
 
P

papou

Jonas
Please replace:
Object Explorer with Object Browser
and
Global Members with Members of...

Cordially
Pascal
 
J

Jonas

Jonas
Please replace:
Object Explorer with Object Browser
and
Global Members with Members of...

Cordially
Pascal

"papou" <[email protected]> a écrit dans le message
de%23h%23bDfVEIHA.2__BEGIN_MASK_n#[email protected]...




- Show quoted text -

Pascal,

Thanks for the response. However, already I knew how to add
description pertaining to the function. I want to be able to add a
description to an arguement. In addition to what Doug has written, I
might try to create a form that has my user-defined functions in it.
Maybe I can come up with some code that will have my form appear with
my functions rather than the dialog box that now appears when I choose
user-defined functions.

I'm surprised that the ability to do this isn't available in Excel
without creating a form. Maybe that is the problem, I'm not working
in Visual Studio; just Excel.

If you have any idea on how to associate a help file with the
function, please let me know. The section that I see for the place to
add it is grey and inaccessible.
 
G

Gord Dibben

You can add a brief description of your UDF by going to Tools>Macro>Macros.

Type in the name of your UDF and "Options". Add a description and hit OK then
Cancel.

To actually add the arguments you will need something more complex.

To fully customize your User Defined Functions....

See Laurent Longre's website for FUNCUSTOMIZE add-in.

ZIP file also includes a demo file and a how-to-use file.

http://longre.free.fr/english/index.html

UNFORTUNATELY................Ballon/Screen Tips are not available with Laurent's
method.


Gord Dibben Excel MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top