Home |
Search |
Today's Posts |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks !!
Here's the code I finally used: Sub Ajoute() Dim CategName As String CategName = "MyCateg" Sheets.Add Type:=xlExcel4MacroSheet ActiveWorkbook.Names.Add Name:="TmpFunction", RefersToR1C1:="=Macro1!R1C1", _ Category:="MyCateg", MacroType:=xlFunction AjouteFonction ("MyFunc") AjouteFonction ("MyOtherFunc") Application.DisplayAlerts = False ActiveWindow.SelectedSheets.Delete Application.DisplayAlerts = True End Sub Sub AjouteFonction(funcName As String) On Error GoTo err: For i = 1 To 20 Application.MacroOptions Macro:=funcName, Category:=i Next i err: End Sub Public Function MyFunc(dbl1 As Double, dbl2 As Double) As Double MyFunc = dbl1 + dbl2 End Function Public Function MyOtherFunc(dbl1 As Double, dbl2 As Double) As Double MyFunc = dbl1 * dbl2 End Function |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel Data Validation/Lookup function does function correcty | Excel Worksheet Functions | |||
copy of excel file not showing formulal/function in the function b | Excel Discussion (Misc queries) | |||
Adding a custom function to the default excel function list | Excel Programming | |||
When I Import an Access Table With an Excel Function in a Cell it Displays as Text not as a Function in Excel | Excel Programming | |||
Excel - saving result of a function without showing the function | Excel Programming |