adding command button to menu
Sub AddMacro()
Set bar = CommandBars("Standard")
Set ctl = bar.Controls _
.Add(Type:=msoControlButton)
ctl.Caption = "Run my macro"
ctl.Style = msoButtonCaption
'Macro to run
ctl.OnAction = "MyMacro"
End Sub
--
urkec
"excel-tr" wrote:
Hi,
how can I add a command button to standart excel toolbar.When I click it a
macro will work.
regards.
--
SAHRAYICEDIT-ISTANBUL
|