-
I don't have access to 2003, but here's a reference
http://support.microsoft.com/kb/830502
Create a custom command control on a menu
The following example code creates a new command that is named Custom1 on the Tools menu of the Worksheet menu bar, and then runs the Code_Custom1 macro when you click Custom1:
[vba]
Sub menuItem_Create()
With CommandBars("Worksheet menu bar").Controls("Tools")
.Controls.Add(Type:=msoControlButton, Before:=1).Caption = "Custom1"
.Controls("Custom1").OnAction = "Code_Custom1"
End With
End Sub
[/vba]
2007/2010 still work with CommandBars, but I don't really remember how to create thenPaul
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules