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 |
All times are GMT +1. The time now is 10:38 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com