ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   UDF (https://www.excelbanter.com/excel-programming/442211-udf.html)

JP Ronse

UDF
 
Hi All,

When entering a standard Excel function, it is showing all parameters as a
short help on the function.

Is this something we can do also with UDF and how?

With kind regards,

JP




ker_01

UDF
 
Last year I made some modifications to Fabrice Rimlinger's open source
sparklines tool for a project I was working on, and added some help text. It
has been too long for me to remember all the details, but the snippet below
may lead you in the right direction.

HTH,
Keith

Sub PiechartCreate3() 'PieChartCreate3

Dim StrDescription As String 'limit of approx 250 characters or
macroOptions throws an error
'there also seems to be a limit of 3
visible lines/rows total

StrDescription = _
"If SUM(range) < 1 use 'SmallValueKey':" & Chr(13) & _
" 1: Show values as-is" & Chr(13) & _
" 2: Show values as a % of SUM(range); automatically totals 100%"

Application.MacroOptions Macro:="PieChart3", Description:=StrDescription


Dim OldFormula As String
OldFormula = ActiveCell.formula
OldFormula = Replace(OldFormula, "=+", "=")
If Not LCase(Left(ActiveCell.formula, 11)) = "=piechart3(" Then
ActiveCell = "=piechart3()"
Application.Dialogs(xlDialogFunctionWizard).Show
If LCase(ActiveCell.formula) = "=piechart3()" Then
ActiveCell.formula = OldFormula
Else
ActiveCell.Calculate
End If
End Sub

"JP Ronse" wrote:

Hi All,

When entering a standard Excel function, it is showing all parameters as a
short help on the function.

Is this something we can do also with UDF and how?

With kind regards,

JP



.


JP Ronse

UDF
 
Hi Keith,

Thanks for your input but it was not really what I was looking for.



With kind regards.

JP


"ker_01" wrote in message
...
Last year I made some modifications to Fabrice Rimlinger's open source
sparklines tool for a project I was working on, and added some help text.
It
has been too long for me to remember all the details, but the snippet
below
may lead you in the right direction.

HTH,
Keith

Sub PiechartCreate3() 'PieChartCreate3

Dim StrDescription As String 'limit of approx 250 characters or
macroOptions throws an error
'there also seems to be a limit of 3
visible lines/rows total

StrDescription = _
"If SUM(range) < 1 use 'SmallValueKey':" & Chr(13) & _
" 1: Show values as-is" & Chr(13) & _
" 2: Show values as a % of SUM(range); automatically totals 100%"

Application.MacroOptions Macro:="PieChart3",
Description:=StrDescription


Dim OldFormula As String
OldFormula = ActiveCell.formula
OldFormula = Replace(OldFormula, "=+", "=")
If Not LCase(Left(ActiveCell.formula, 11)) = "=piechart3(" Then
ActiveCell = "=piechart3()"
Application.Dialogs(xlDialogFunctionWizard).Show
If LCase(ActiveCell.formula) = "=piechart3()" Then
ActiveCell.formula = OldFormula
Else
ActiveCell.Calculate
End If
End Sub

"JP Ronse" wrote:

Hi All,

When entering a standard Excel function, it is showing all parameters as
a
short help on the function.

Is this something we can do also with UDF and how?

With kind regards,

JP



.





All times are GMT +1. The time now is 05:20 PM.

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