Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello all,
I have a code that creates a command button when the Excel file opens. The following is the code that I use: Set nBar = CommandBars("Standard") nBar.Visible = True Set nCon = nBar.Controls.Add(Type:=msoControlButton, Temporary:=True) With nCon .BeginGroup = True .Style = msoButtonCaption .Caption = "Macro" .OnAction = "RunMacro" End With What I would like to do is to remove the above command button "Macro" when the Excel file closes. I have tried to use the following code, and it did not work. Application.CommandBars("Standard").Controls("Macr o").Delete Please help. Thanks. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
print command from command button in userform causes double chart | Excel Programming | |||
BUG: print command from command button in userform causes double c | Excel Programming | |||
Deselect Command Button by Selecting another Command Button | Excel Programming | |||
VB's Command Button vs Form's Command Button | Excel Programming | |||
Removing Command Button | Excel Programming |