Working with customised excel ribbons, I can save some ribbon.control objects as user-defined object variables, by recognising their control.IDs during CallBacks, and setting my own corresponding object variables. This works ok: new object variables yield the same ID values as the original ribbon.control objects they were derived from. These user defined variables help to coordinate Button property changes as task context changes occur within the task that the buttons control.
To improve the ease with which I select the appropriate object variables, I would like to save the object variables, or a reference to each object variable, on an excel sheet (for choice) or an array. The 2-D positioning of the objects on a sheet would place them in logical relations to other data, and hence simplify coding.
If Collections are the way forward, I have used collections to create and evaluate responses to ctls in UserForms that have been created on the fly. But I'd rather read the variables from excel cells!! And arrays have the same dimensions as sheets.
I realise that the object variables will not persist when the excel file is closed.
I've read this: https://msdn.microsoft.com/en-us/vba/language-reference-vba/articles/creating-object-variables
I know nothing about the possibilities, practicalities and risks of what I think I'd like to do.
Could you give me some advice, or guide me to resources, please.