ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   UDF with user help (https://www.excelbanter.com/excel-programming/402393-udf-user-help.html)

Arne Hegefors

UDF with user help
 
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

UDF with user help
 
Look he

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

No easy stuff!

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"Arne Hegefors" wrote in message
...
| 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

UDF with user help
 
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


"Arne Hegefors" wrote in message
...
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

UDF with user help
 
<<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!
--
Regards,
Bill Renaud




Peter T

UDF with user help
 
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


"Bill Renaud" wrote in message
. ..
<<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!
--
Regards,
Bill Renaud






Bill Renaud

UDF with user help
 
<<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.

--
Thanks,
Bill Renaud





All times are GMT +1. The time now is 11:59 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com