LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Gord Dibben
 
Posts: n/a
Default

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I display a data table in an Excel 2002 chart? Dr. Mark F. Charts and Charting in Excel 3 December 29th 04 03:04 PM
Stubborn toolbars in Excel 007 Excel Discussion (Misc queries) 9 December 11th 04 02:02 PM
Getting Excel 2003 to save Custom Toolbars MIKE MEDLIN Excel Discussion (Misc queries) 1 December 7th 04 07:33 PM
Excel 2002 vs Outlook 2003 Bill Clark Excel Discussion (Misc queries) 1 December 2nd 04 09:03 PM
Report Manager in Excel 2002 Misha Excel Discussion (Misc queries) 2 November 28th 04 06:59 AM


All times are GMT +1. The time now is 08:51 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"