Home |
Search |
Today's Posts |
#4
![]() |
|||
|
|||
![]()
fick
Example code from http://support.microsoft.com/default...EN-US;Q166755& The .OnAction step runs the macro assigned to that item. Sub menuItem_Create() With CommandBars("Worksheet menu bar").Controls("Tools") .Controls.Add(Type:=msoControlButton, Befo=1).Caption = _ "Custom1" .Controls("Custom1").OnAction = "Code_Custom1" End With End Sub NOTE: This is the code that runs when you click Custom1. Sub Code_Custom1() MsgBox "you clicked Custom1" End Sub You may also take a look at John Walkenbach's MENUMAKR.xls for creating menus. http://j-walk.com/ss/excel/tips/tip53.htm Gord On 13 Dec 2004 07:46:09 -0800, "fick" wrote: Thanks Gord I know the best way to fix this problem is by creating custom toolbars in VBA but how do you link the Macros????? Thanks fick |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I display a data table in an Excel 2002 chart? | Charts and Charting in Excel | |||
Stubborn toolbars in Excel | Excel Discussion (Misc queries) | |||
Getting Excel 2003 to save Custom Toolbars | Excel Discussion (Misc queries) | |||
Excel 2002 vs Outlook 2003 | Excel Discussion (Misc queries) | |||
Report Manager in Excel 2002 | Excel Discussion (Misc queries) |