G Guest Feb 27, 2004 #1 I've added a custom toolbar button to my excel program, and it now appears in all excel applications. How can I have it appear just in the program where I want it Thanks
I've added a custom toolbar button to my excel program, and it now appears in all excel applications. How can I have it appear just in the program where I want it Thanks
C Chip Pearson Feb 27, 2004 #2 Ron, Use the Activate and Deactivate events to show or hide the command bar. Private Sub Workbook_Activate() Application.CommandBars("MyCommandBar").Visible = True End Sub Private Sub Workbook_Deactivate() Application.CommandBars("MyCommandBar").Visible = False End Sub -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com RonF said: I've added a custom toolbar button to my excel program, and it Click to expand... now appears in all excel applications. How can I have it appear just in the program where I want it.
Ron, Use the Activate and Deactivate events to show or hide the command bar. Private Sub Workbook_Activate() Application.CommandBars("MyCommandBar").Visible = True End Sub Private Sub Workbook_Deactivate() Application.CommandBars("MyCommandBar").Visible = False End Sub -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com RonF said: I've added a custom toolbar button to my excel program, and it Click to expand... now appears in all excel applications. How can I have it appear just in the program where I want it.