Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Commandbar on thisworkbook only
When creating a commandbar with the code below it is only a temporarily
commandbar and that is great, however it is only temp in that sense that you have to close the Excel application down and reopen before the commandbar removed. Is there away to have the commandbar removed as soon as you close the worksheet that has the macro and command? Dim oCb As CommandBar Dim oCtl As CommandBarButton Set oCb = Application.CommandBars("Worksheet Menu Bar") With oCb Set oCtl = .Controls.Add( _ Type:=msoControlButton, _ temporary:=True) oCtl.Caption = "myButton" oCtl.Style = msoButtonCaption oCtl.OnAction = "myMacro" End With Thank you in advance for you help. Rene |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
CommandBar | Excel Programming | |||
Help with ThisWorkbook | Excel Programming | |||
Help with ThisWorkbook | Excel Programming | |||
Help with ThisWorkbook | Excel Programming | |||
ThisWorkbook | Excel Programming |