View Full Version : custom ribbon tab not visible for all workbooks

2020-10-28, 06:31 AM
I have an xlam file dedicated exclusively for the displaying a custom ribbon tab (I created it with Andy Pope's excellent addin). Normally the tab is visible for all workbooks. But I've encountered a situation where it is not always displaying for a workbook opened with a Workbooks.Open statement in VBA. What could cause this?



2020-11-15, 05:54 PM
I have found most of the answer to my question. The default Label property of my tab is empty because it is intended to be filled in by the GetLabel callback at run time. The reason for that is to use a language not known until the ribbon is loaded.

When a VBA macro opens a workbook, GetLabel doesn't get called until after that macro finishes. If that macro is stopped by a breakpoint or runtime error before finishing, the ribbon callbacks don't get called, and the label of my tab is empty. The tab is actually in the ribbon, but it has a blank label.