It work's fine.
but if I use Insert function wizard I have no help available about this my
function.
Where can I put this help ???? (description about this parameters)
Thank you
LP
Marjan
Please don't crosspost.
Here's the answer given in Programming:
Use:
Tools > Macro > Macros
Type in the name of your function
Press Options
Type in a brief description of your Function
OK
Cancel (Yes! Strange but true!)
When you select that function in the Function Wizard you will now see your
description and that description will also appear in the Function Entry
Dialog.
To attach descriptions of each argument involves another much more complex
approach.
This is the approach used for that task:
Created by Laurent Longre
This example shows how to register functions into user-defined catagories
and
provide descriptions for their arguments. The Auto_Open procedure registers
the two functions, Multiply and Divide in two categories Multiplication and
Division and provides descriptions of the input parameters.
Const Lib = """c:\windows\system\user32.dll"""
Option Base 1
Private Function Multiply(N1 As Double, N2 As Double) As Double
Multiply = N1 * N2
End Function
'==========================================
Private Function Divide(N1 As Double, N2 As Double) As Double
Divide = N1 / N2
End Function
'==========================================
Sub Auto_open()
Register "DIVIDE", 3, "Numerator,Divisor", 1, "Division", _
"Divides two numbers", """Numerator"",""Divisor """, "CharPrevA"
Register "MULTIPLY", 3, "Number1,Number2", 1, "Multiplication", _
"Multiplies two numbers", """First number"",""Second number """, _
"CharNextA"
End Sub
'==========================================
Sub Register(FunctionName As String, NbArgs As Integer, _
Args As String, MacroType As Integer, Category As String, _
Descr As String, DescrArgs As String, FLib As String)
Application.ExecuteExcel4Macro _
"REGISTER(" & Lib & ",""" & FLib & """,""" & String(NbArgs, "P") _
& """,""" & FunctionName & """,""" & Args & """," & MacroType _
& ",""" & Category & """,,,""" & Descr & """," & DescrArgs & ")"
End Sub
'==========================================
Sub Auto_close()
Dim FName, FLib
Dim I As Integer
FName = Array("DIVIDE", "MULTIPLY")
FLib = Array("CharPrevA", "CharNextA")
For I = 1 To 2
With Application
.ExecuteExcel4Macro "UNREGISTER(" & FName(I) & ")"
.ExecuteExcel4Macro "REGISTER(" & Lib & _
",""CharPrevA"",""P"",""" & FName(I) & """,,0)"
.ExecuteExcel4Macro "UNREGISTER(" & FName(I) & ")"
End With
Next
End Sub
hth
"Marjan KLJUN" <marjan...@src.si> wrote in message
news:rAXu7.852$8v1....@news.siol.net...
I didn't write that this function is in xla (add-in)
I can't see it in tools/macro/
Marjan
"Norman Harker" <nha...@ozemail.com.au> wrote in message
news:3fYu7.15149$bL3.3...@ozemail.com.au...
You won't see the function listed when you use Tools > Macro > Macros but if
you then type the name in the top bar, the Option button will become active.
Don't worry about making mistakes here, we're all very friendly and rarely
bite <vbg>. You'll find other tips for new posters at (and a fair amount of
reasons and other useful tips) at:
http://www.cpearson.com/excel/newposte.htm
hth.
"Marjan KLJUN" <marjan...@src.si> wrote in message
news:9PYu7.856$8v1....@news.siol.net...
"Norman Harker" <nha...@ozemail.com.au> wrote in message
news:gJZu7.15221$bL3.3...@ozemail.com.au...
I suspect that this is because your xla file in VBE is protected. If this is
the case then:
Access the VBE and
Click on the file in the Project Explorer,
Give the password.
Now back to Excel and you should be able to access options.
hth
"Marjan KLJUN" <marjan...@src.si> wrote in message
news:o6_u7.862$8v1....@news.siol.net...