Dear Experts,
I have gradually started learning about UDF's and the first thing which came to my mind was that there should be some mechanism to make it easier for the user to provide the necessary arguments...
I came across a lot of articles on this which gave information on making the information available while using it through Insert Fx...
However, I am in the habit of typing the functions so I would be keen to get the Yellow Tool Tip which helps me to understand what data i need to provide while using the UDF..
</span>[/FONT][/COLOR]
'http://spreadsheetpage.com/index.php/tip/user-defined_function_argument_descriptions_in_excel_2010/
Public Sub DescribeFunction()
Dim FuncName As String
Dim FuncDesc As String
Dim Category As String
Dim ArgDesc(1 To 3) As String
FuncName = "EXTRACTELEMENT"
FuncDesc = "Returns the nth element of a string that uses a separator character"
Category = 7 'Text category
ArgDesc(1) = "String that contains the elements"
ArgDesc(2) = "Element number to return"
ArgDesc(3) = "Single-character element separator"
Application.MacroOptions _
Macro:=FuncName, _
Description:=FuncDesc, _
Category:=Category, _
ArgumentDescriptions:=ArgDesc
End Sub
[/CODE]
The CODE in the FUNCTION is as below
Warm REgards
all4excel
I have gradually started learning about UDF's and the first thing which came to my mind was that there should be some mechanism to make it easier for the user to provide the necessary arguments...
I came across a lot of articles on this which gave information on making the information available while using it through Insert Fx...
However, I am in the habit of typing the functions so I would be keen to get the Yellow Tool Tip which helps me to understand what data i need to provide while using the UDF..
HTML:
Vlookup ( lookup_value, table_array, col_index_num, [range lookup] )
[COLOR=#6B7770][FONT=Open Sans]I would be happy if my UDF's would be so informative to other users..
'http://spreadsheetpage.com/index.php/tip/user-defined_function_argument_descriptions_in_excel_2010/
Public Sub DescribeFunction()
Dim FuncName As String
Dim FuncDesc As String
Dim Category As String
Dim ArgDesc(1 To 3) As String
FuncName = "EXTRACTELEMENT"
FuncDesc = "Returns the nth element of a string that uses a separator character"
Category = 7 'Text category
ArgDesc(1) = "String that contains the elements"
ArgDesc(2) = "Element number to return"
ArgDesc(3) = "Single-character element separator"
Application.MacroOptions _
Macro:=FuncName, _
Description:=FuncDesc, _
Category:=Category, _
ArgumentDescriptions:=ArgDesc
End Sub
[/CODE]
The CODE in the FUNCTION is as below
Code:
Function EXTRACTELEMENT(Txt, n, Separator) As String EXTRACTELEMENT = Split(Application.Trim(Txt), Separator)(n - 1)
End Function
Warm REgards
all4excel