Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Maybe I'm missing something, but this should be working...
Private WithEvents objCommandBarButton As CommandBarButton Private Sub Workbook_Open() Dim obkCommandbars As CommandBars Dim objCommandBar As CommandBar Dim objCommandBarControl As CommandBarControl ' Create a menu command on the "Tools" menu. objCommandBars = Me.Application.CommandBars("Tools") objCommandBar = objCommandBars.Item("Tools") ' Make sure menu command doesn't already exist. For Each objCommandBarControl In objCommandBar.Controls If objCommandBarControl.Caption = "Perform Metric conversion..." Then objCommandBar.Controls.Item("Perform Metric conversion...").Delete End If Next objCommandBarControl objCommandBarButton = objCommandBar.Controls.Add(msoControlButton) With objCommandBarButton .Caption = "Perform Metrics Conversion..." .Style = msoButtonCaption .Tag = "Perform Metrics Conversion..." .OnAction = "!<Magic_Metrics.Connect" .Visible = True End With End Sub Thanks, Jody W |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Connect a number to a picture bank and import that picture to exce | Excel Discussion (Misc queries) | |||
Insert Calculated Field (wrong Qty*Price = wrong Amount) | Excel Discussion (Misc queries) | |||
insert a picture in to a comment but picture not save on hard disk | Excel Discussion (Misc queries) | |||
What's wrong with this picture | Excel Programming | |||
What's wrong with this picture? VBA Date code.. | Excel Programming |