ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   how to make self-made vba function easily understood. (https://www.excelbanter.com/excel-programming/275839-how-make-self-made-vba-function-easily-understood.html)

youngman

how to make self-made vba function easily understood.
 
hi,

i am making some funcyions in excel vba ,when the fun is complicated it is
diffcult to recognize the meaning when i use the function.


for instance
Function CalculateSquareRoot(NumberArg As Double) As Double
If NumberArg < 0 Then
Exit Function '
Else
CalculateSquareRoot = Sqr(NumberArg)
End If
End Function

i mean how to make the meaning of NumberArg be easily recognized.
how to make a hint about the fun.

thank you




Tom Ogilvy

how to make self-made vba function easily understood.
 
VBA functions don't support text descriptions in the Function wizard.

You can look at the information Laurent Longre has posted on his site about
this:

http://longre.free.fr/english/func_cats.htm

Newer addin that supports this:
http://longre.free.fr/english/index.html#FunCustomize

--
Regards,
Tom Ogilvy


"youngman" wrote in message
...
hi,

i am making some funcyions in excel vba ,when the fun is complicated it

is
diffcult to recognize the meaning when i use the function.


for instance
Function CalculateSquareRoot(NumberArg As Double) As Double
If NumberArg < 0 Then
Exit Function '
Else
CalculateSquareRoot = Sqr(NumberArg)
End If
End Function

i mean how to make the meaning of NumberArg be easily recognized.
how to make a hint about the fun.

thank you






bruce taylor

how to make self-made vba function easily understood.
 
Someone has found a way of putting a helpfull paragraph
in the function wizard dialog box.

Open vba development window, place cursor inside your
UDF, press F2. This opens the object explorer.

Select your project from the list of libraries, right
click on your UDF (in the RH pane) and select properties.
Type your paragraph here.
-----Original Message-----
VBA functions don't support text descriptions in the

Function wizard.

You can look at the information Laurent Longre has

posted on his site about
this:

http://longre.free.fr/english/func_cats.htm

Newer addin that supports this:
http://longre.free.fr/english/index.html#FunCustomize

--
Regards,
Tom Ogilvy


"youngman" wrote in message
...
hi,

i am making some funcyions in excel vba ,when the fun

is complicated it
is
diffcult to recognize the meaning when i use the

function.


for instance
Function CalculateSquareRoot(NumberArg As Double) As

Double
If NumberArg < 0 Then
Exit Function '
Else
CalculateSquareRoot = Sqr(NumberArg)
End If
End Function

i mean how to make the meaning of NumberArg be easily

recognized.
how to make a hint about the fun.

thank you





.


Tom Ogilvy

how to make self-made vba function easily understood.
 
Just to clarify Bruce's statement in contrast to my advice: That puts in a
description of the function, but not text for the arugments (the question
asked as I understood it).


--
Regards,
Tom Ogilvy

"bruce taylor" wrote in message
...
Someone has found a way of putting a helpfull paragraph
in the function wizard dialog box.

Open vba development window, place cursor inside your
UDF, press F2. This opens the object explorer.

Select your project from the list of libraries, right
click on your UDF (in the RH pane) and select properties.
Type your paragraph here.
-----Original Message-----
VBA functions don't support text descriptions in the

Function wizard.

You can look at the information Laurent Longre has

posted on his site about
this:

http://longre.free.fr/english/func_cats.htm

Newer addin that supports this:
http://longre.free.fr/english/index.html#FunCustomize

--
Regards,
Tom Ogilvy


"youngman" wrote in message
...
hi,

i am making some funcyions in excel vba ,when the fun

is complicated it
is
diffcult to recognize the meaning when i use the

function.


for instance
Function CalculateSquareRoot(NumberArg As Double) As

Double
If NumberArg < 0 Then
Exit Function '
Else
CalculateSquareRoot = Sqr(NumberArg)
End If
End Function

i mean how to make the meaning of NumberArg be easily

recognized.
how to make a hint about the fun.

thank you





.




youngman

how to make self-made vba function easily understood.
 
thanks a lot
best regards
-------------
"Tom Ogilvy" wrote in message
...
VBA functions don't support text descriptions in the Function wizard.

You can look at the information Laurent Longre has posted on his site

about
this:

http://longre.free.fr/english/func_cats.htm

Newer addin that supports this:
http://longre.free.fr/english/index.html#FunCustomize

--
Regards,
Tom Ogilvy


"youngman" wrote in message
...
hi,

i am making some funcyions in excel vba ,when the fun is complicated it

is
diffcult to recognize the meaning when i use the function.


for instance
Function CalculateSquareRoot(NumberArg As Double) As Double
If NumberArg < 0 Then
Exit Function '
Else
CalculateSquareRoot = Sqr(NumberArg)
End If
End Function

i mean how to make the meaning of NumberArg be easily recognized.
how to make a hint about the fun.

thank you







youngman

how to make self-made vba function easily understood.
 
thank you very much.

i am sorry i failed to save the property.
anything wrong with excel.
regards

"bruce taylor" wrote in message
...
Someone has found a way of putting a helpfull paragraph
in the function wizard dialog box.

Open vba development window, place cursor inside your
UDF, press F2. This opens the object explorer.

Select your project from the list of libraries, right
click on your UDF (in the RH pane) and select properties.
Type your paragraph here.
-----Original Message-----
VBA functions don't support text descriptions in the

Function wizard.

You can look at the information Laurent Longre has

posted on his site about
this:

http://longre.free.fr/english/func_cats.htm

Newer addin that supports this:
http://longre.free.fr/english/index.html#FunCustomize

--
Regards,
Tom Ogilvy


"youngman" wrote in message
...
hi,

i am making some funcyions in excel vba ,when the fun

is complicated it
is
diffcult to recognize the meaning when i use the

function.


for instance
Function CalculateSquareRoot(NumberArg As Double) As

Double
If NumberArg < 0 Then
Exit Function '
Else
CalculateSquareRoot = Sqr(NumberArg)
End If
End Function

i mean how to make the meaning of NumberArg be easily

recognized.
how to make a hint about the fun.

thank you





.



Mike Preston

how to make self-made vba function easily understood.
 
I know this is a tacky way to do it, but you could add two arguments.
The first is a string (perhaps "DocumentationComment") and the second
is a Boolean.

The first is ignored, the second, if true, causes the function to
raise a Message Box with whatever comments you would like to see.

So, an example might be that you wrote the following into a cell:

=CalculateSquareRoot(4,"Set the following value to true if you want to
see a message regarding how this function works.",false)

for the following function:

CalculateSquareRoot(NumberArg As Double, DocumentationComment as
string,RaiseMessage as Boolean)

Function CalculateSquareRoot(NumberArg As Double, DocumentationComment
as string,RaiseMessage as Boolean) As Double
' Note that DocumentationComment is ignored
If RaiseMessage = True then
Msgbox "This function is used to determine the square root of a
number."
endif
If NumberArg < 0 Then
Exit Function '
Else
CalculateSquareRoot = Sqr(NumberArg)
End If
End Function

I know, tacky.

mike

On Tue, 2 Sep 2003 09:30:57 -0400, "Tom Ogilvy"
wrote:

Just to clarify Bruce's statement in contrast to my advice: That puts in a
description of the function, but not text for the arugments (the question
asked as I understood it).


--
Regards,
Tom Ogilvy

"bruce taylor" wrote in message
...
Someone has found a way of putting a helpfull paragraph
in the function wizard dialog box.

Open vba development window, place cursor inside your
UDF, press F2. This opens the object explorer.

Select your project from the list of libraries, right
click on your UDF (in the RH pane) and select properties.
Type your paragraph here.
-----Original Message-----
VBA functions don't support text descriptions in the

Function wizard.

You can look at the information Laurent Longre has

posted on his site about
this:

http://longre.free.fr/english/func_cats.htm

Newer addin that supports this:
http://longre.free.fr/english/index.html#FunCustomize

--
Regards,
Tom Ogilvy


"youngman" wrote in message
...
hi,

i am making some funcyions in excel vba ,when the fun

is complicated it
is
diffcult to recognize the meaning when i use the

function.


for instance
Function CalculateSquareRoot(NumberArg As Double) As

Double
If NumberArg < 0 Then
Exit Function '
Else
CalculateSquareRoot = Sqr(NumberArg)
End If
End Function

i mean how to make the meaning of NumberArg be easily

recognized.
how to make a hint about the fun.

thank you





.






All times are GMT +1. The time now is 12:51 AM.

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