Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / December 2007

Tip: Looking for answers? Try searching our database.

UDF with user help

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Arne Hegefors - 07 Dec 2007 12:42 GMT
Hi! I have written several UDFs that other people use. They dont know it is a
UDF they just use it as a normal function in excel. is there any way to add
some help to the udf? they usually use the list of functions (insert
function) and there they have help for all non udf functions. Thanks alot!
Niek Otten - 07 Dec 2007 13:37 GMT
Look here:

http://www.jkp-ads.com/Articles/RegisterUDF00.htm

No easy stuff!

Signature

Kind regards,

Niek Otten
Microsoft MVP - Excel

| Hi! I have written several UDFs that other people use. They dont know it is a
| UDF they just use it as a normal function in excel. is there any way to add
| some help to the udf? they usually use the list of functions (insert
| function) and there they have help for all non udf functions. Thanks alot!
Peter T - 07 Dec 2007 14:59 GMT
Depends to what extent you want to go. The method as referred to by Niek is
excellent though, as he says, not simple.

Something quick and simple that you could do, although far from complete, is
to add a description that can be viewed after user finds your UDF in the
"User Defined" category -

Press F2 Object Browser
In libraries select your project
In classes select your module that contains your UDF(s)
In members select your UDF
right click, properties
enter your text that will appear in the function wizard.

You can also link your own help file, though that really is a lot more work
if you've not done it before.

Regards,
Peter T

> Hi! I have written several UDFs that other people use. They dont know it is a
> UDF they just use it as a normal function in excel. is there any way to add
> some help to the udf? they usually use the list of functions (insert
> function) and there they have help for all non udf functions. Thanks alot!
Bill Renaud - 07 Dec 2007 17:14 GMT
<<Something quick and simple that you could do, although far from complete,
is to add a description that can be viewed after user finds your UDF in the
"User Defined" category>>

Hopefully this feature works in later versions of Excel! In Excel 2000
(SP-3), Excel just throws the Description field away after the programmer
enters it in the Member Options dialog box!
Signature

Regards,
Bill Renaud

Peter T - 07 Dec 2007 17:38 GMT
It works fine in my Excel 2000. There is another way though.
Export the module and open from file in a text editor.

After the function name include the description attribute, eg

Function foo(arg)
Attribute foo.VB_Description = "first line of info\r\nSecond line more info"
' your code
End Function

The \r\n in the string will force a new line (max 2 lines in xl97, 3 in
later versions) or just allow to wrap.
Save and import back into your project (drag from file) after removing the
old bas.

Regards,
Peter T

> <<Something quick and simple that you could do, although far from complete,
> is to add a description that can be viewed after user finds your UDF in the
[quoted text clipped - 3 lines]
> (SP-3), Excel just throws the Description field away after the programmer
> enters it in the Member Options dialog box!
Bill Renaud - 07 Dec 2007 18:01 GMT
<<Export the module and open from file in a text editor.

After the function name include the description attribute, eg

Function foo(arg)
Attribute foo.VB_Description = "first line of info\r\nSecond line more
info"
' your code
End Function

The \r\n in the string will force a new line (max 2 lines in xl97, 3 in
later versions) or just allow to wrap. Save and import back into your
project (drag from file) after removing the old bas.>>

Great tip! I'll definitely save this one for future use! I don't know why
setting the Description doesn't work in my installation.

Signature

Thanks,
Bill Renaud

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.