custom ribbon tab not visible for all workbooks

xlrotor

New member
Joined
Oct 28, 2020
Messages
2
Reaction score
0
Points
0
Website
www.xlrotor.com
Excel Version(s)
365
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?

Thanks,

Brian
 
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.
 
Back
Top