how to add help to a user defined function

J

Jim H

I have created a function and would like to offer help (suggestions) as other
excel functions provide. For example, my UDF function reverses the order of
a delimited string, or will pull out one of the items within the string and
return it to a worksheet cell, depending on whether a optional variable is
passed. I would like the function to provide a suggestion as the user types
the function, so the user should see =rever_text(arg1, optional[arg2]). Or
something to that affect.

Thanks
 
B

Bob Phillips

Until you hit enter, the function doesn't come into play, and then it is to
return a value.

You could use event code to check if the start input is =rever_text and
throw up a box, but it seems intrusive and overkill to me.
 
P

Paul Corrado

Walkenbach provides the instructions for creating a description and a help
topic in Power Programming With VBA.
 
M

Myrna Larson

The event code doesn't run until the user hits Enter or Tab to get out of edit
mode, right?
 
G

Gord Dibben

Jim

You can add a brief description(not arguments) if you open the VBEditor and
View>Object Browser.

Find your UDF and right-click and you can add a comment there.

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


Gord Dibben Excel MVP
 
B

Bob Phillips

No, I was thinking that after the enter the event code takes over and
solicits the next input, hence the box, and the statement about overkill.
 

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