Invalidate Ribbon Control Without Module-Level Variables
问题 I've developed an Excel add-in that includes a custom ribbon. I'd like to be able to invalidate (enable/disable) a control on the ribbon in certain situations, but every example I can find uses a module-level or global variable to store the ribbon object when the ribbon is first loaded. This seems like a good way to do it, but, as listed here, there are instances when variables can empty. So I'm wondering, is there a different way to achieve the result of enabling/disabling a control in an