Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to attach function to a custom Menubar?
I have created a custom Menubar with 3 buttons in it. I got the code from this NG posted by Bert. I would like to attach the UDF I have written with these buttons. How to attach the UDF function to button? I want when clicked on button created, Formula wizard should come up displaying UDF areguments. It is the popup you can see after click on fx, selecting a function and click okey. Menubar code written by Bert is as below(modified to my requirement) Sub Add_Menubar() Dim mb As CommandBar Dim MenuName As String Dim Cap(1 To 4) Dim Act(1 To 4) Cap(1) = "Growth" Act(1) = Growth 'Growth is custom function or UDF Cap(2) = "SP Incentive" Act(2) = "SP_Incentive" 'SP_Incentiveis also UDF function. MenuName = "&Salary" MenuBars(xlWorksheet).Menus.Add Caption:=MenuName, befo="Help" With MenuBars(xlWorksheet).Menus(MenuName).MenuItems Add Caption:=Cap(1), OnAction:=Act(1) Add Caption:=Cap(2), OnAction:=Act(2) End With End Sub Regards, Malcom -- Malcom Jazz ------------------------------------------------------------------------ Malcom Jazz's Profile: http://www.excelforum.com/member.php...o&userid=15872 View this thread: http://www.excelforum.com/showthread...hreadid=273601 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
can i attach picture to cell and use vlookuo function? | Excel Discussion (Misc queries) | |||
Custom Menubar | Excel Discussion (Misc queries) | |||
How can I attach a custom toolbar to only appear on one specific . | Excel Worksheet Functions | |||
Attach custom list to a cell | Excel Programming | |||
attach custom toolbar to spreadsheet: how? | Excel Programming |