Unintended consequences ...
What worked in Excel 2007 with multiple document interface no longer works in Excel 365 with single document interface.
Using a workbook with the four command bar items below works fine. However when that workbook is closed the below code fires and deletes the custom items. However, the menu items remain in all subsequent opened workbooks. I don't want that. When the
macro workbook closes, I want the custom menu items to close as well.
This code worked in 2007, and would not stay for subsequent workbooks. Why not Office 365?
Sub RidIt()
CommandBars("Cell").Controls("Add Comments").Delete
CommandBars("Cell").Controls("Customer Detail").Delete
CommandBars("Cell").Controls("Load Items").Delete
CommandBars("Cell").Controls("Load Payments").Delete
End Sub