Add help to UDF

waits77

New Member
Joined
Oct 6, 2002
Messages
5
How can I add help/instructions to a UDF such that the help is available prior to inserting the function. In other words, I don't want to put text in a control or msgbox.
 
Is it safe to say that Help files are a minefield of opinions and confusion?

I confess that my initial hopes were that Microsoft had a unified method of Help, and Help files. And they were shy about making the information known. Now I think they are embarrassed by the conflicting implementations of Help.

As I get into this deeper, it's not a simple matter of pointing someone to a few links; doing that (as I tried) could be considered an act of cruelty. I apologize for that.

For you guys who have done Help files (that leaves me out), is there any hope that creating Help files will eventually become easier to understand and accomplish?
 
Upvote 0

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
On 2002-10-09 22:20, Swamp Thing wrote:
If I understand the original post, the idea was to make the help available directly in the "paste function" dialog box (function wizard). The user would click on the question mark button and then click on "help on this function" ... and voila, up pops a help box for the UDF. In other words the UDF help would be accessed just as one looks for help on built-in functions like VLOOKUP or SUMIF etc.

To achieve this, the path to the help file has to be specified in the VB editor:-
Tools > Project Properties > [enter help file name ]

If your help file contains many bits of information, then you can assign a help context ID to each one. [of course you would do this using one of the many help file tools that we have been discussing]

Then, in the Object Browser, you locate your UDF and right click to see its properties. You can enter the relevant help context ID.

Now when you are looking at the function through the function wizard, the UDF help will pop up if you click on the question mark and request 'help on selected function'.
IIRC, this help will also pop up in VBE when the cursor is on the function name and you click F1.

Finally, if you are using later versions of windows, you can just use a plain vanilla html file instead of .hlp or .chm
This message was edited by Swamp Thing on 2002-10-09 22:28

Yes, propably this is what the OP is looking for :)

Thanks for the tip with the plain vanilla html-file which I was not aware of :)

Kind regards,
Dennis
 
Upvote 0
Does this helps? :biggrin:

<pre>
Sub AddDiscription()
Application.MacroOptions Macro:="Colo", _
Description:="Anything you want" _
& vbCrLf & "Something"
End Sub

Public Function Colo()
Colo = "AAA"
End Function
</pre>
 
Upvote 0
Pardon me if this is a duplicate. I posted a reply, but it never showed up.

Thanks to everyone, especially Colo and Swamp Thing. I'll go run with this and see how much trouble I get into.
 
Upvote 0
To Colo:
Your solution allows fairly limited amounts of information to be displayed in the UDF dialog box. I have done the same thing with the properties for the method using the object browser. However, your method is much more robust. I ended up having this added text point the user to a macro which uses a multiline textbox. Not really what I want, but will do for now. Thanks

To Swamp Thing:
I will try your solution soon. I've spent too much time on this and have to do other stuff for awhile. Thanks
 
Upvote 0
There is, yet another, working solution (That I'm currently having problems with ! :biggrin: ). Laruent Longre explains how to use the REGISTER XLM Macro in VBA to create and register your own UDF as if it was a builtin function, in which you can tell the description for each parameter (Not the variable type though), as well as the "main" description of the function.

It's in french, but worth a visit ! http://longre.free.fr
 
Upvote 0

Forum statistics

Threads
1,214,386
Messages
6,119,215
Members
448,874
Latest member
b1step2far

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top