Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default 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



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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





  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default 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





.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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





.



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default 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








  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default 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





.


  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default 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





.




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I easily make cells in Excel that are square? Todd Excel Discussion (Misc queries) 8 February 4th 09 07:39 PM
Cell shading behavior not understood. DocBrown Excel Discussion (Misc queries) 2 November 14th 08 11:15 PM
anyway around this, easily? dribler2 Excel Worksheet Functions 1 January 9th 07 01:00 AM
how to make a help hint for my function made by myself. steve Excel Programming 2 August 22nd 03 02:11 AM
how to make hint of help or comment of a self-made function. youngman Excel Programming 1 August 12th 03 02:26 AM


All times are GMT +1. The time now is 01:08 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"