Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Explaining an addin

How do I define the arguments in an Excel Addin function that I created? When I bring up a built in Excel function
it does have an expalantion of the arguments. How do I do it for my add-ins? I 'm using Office 2003.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 48
Default Explaining an addin

Let's learn by examples! Below are two custom worksheet functions created using VBA

The first example is a simple function for finding out whether a specific year is a leap year. Observe the syntax for the use of arguement, and also the definition of the value type for the function. (Here, the function returns a Boolean value, either TRUE or FALSE.

'------------------------------------------------
Function ISLEAPYEAR(ByVal year_input as integer) As Boolea
If year_input Mod 4 < 0 The
ISLEAPYEAR = Fals
ElseIf year_input Mod 400 = 0 The
ISLEAPYEAR = Tru
ElseIf year_input Mod 100 = 0 The
ISLEAPYEAR = Fals
Els
ISLEAPYEAR = Tru
End I
End Functio
'------------------------------------------------

The second example finds out the "standard font" defined in Excel. Here, there is an "Optional Arguement". See the syntax and how to define a "default value" for the optional arguement

'------------------------------------------------
Function STDFONT(Optional show_size As Boolean = False) As Strin
'the optional arguement decides whether the standard font size is also shown
STDFONT = Application.STANDARDFON
If show_size = True Then STDFONT = STDFONT & " " & Application.STANDARDFONTSIZE & "pt
End Functio
'------------------------------------------------

Also, you may have a look at the Excel VBA on-line help. Look for the key word "Function statement"


----- EMR Tech wrote: ----

How do I define the arguments in an Excel Addin function that I created? When I bring up a built in Excel functio
it does have an expalantion of the arguments. How do I do it for my add-ins? I 'm using Office 2003

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Explaining an addin

This basically isn't supported in VBA.

You might look at some of the work Laurent Longre has done on this. The
second reference is his newest:


http://longre.free.fr/english/func_cats.htm
the above appears to be a special case and only works with two arguments -
from what I have heard.


http://longre.free.fr/english/index.html#FunCustomize

--
Regards,
Tom Ogilvy

"EMR Tech" wrote in message
...
How do I define the arguments in an Excel Addin function that I created?

When I bring up a built in Excel function
it does have an expalantion of the arguments. How do I do it for my

add-ins? I 'm using Office 2003.


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
I need help on explaining this excel formula in simple language?!! BW Excel Discussion (Misc queries) 2 November 24th 09 10:48 PM
hardship letter explaining devastating loss property loss financi carol Excel Discussion (Misc queries) 1 June 12th 09 02:13 PM
Explaining a formula Tonya B. Excel Worksheet Functions 1 May 17th 07 09:00 PM
text in formula explaining formula not to print Leon Klopper Excel Worksheet Functions 1 June 24th 05 01:04 PM
Remove Excel AddIn from AddIn List !! Help carl Excel Programming 2 December 8th 03 03:36 PM


All times are GMT +1. The time now is 09:48 PM.

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"