I've been playing around with the Add-Ins tab lately and am looking at improving loops when adding Popup controls.

Each popup control has a number of macros linked to it (as Control buttons) and the names of these macros are recorded in a variant array.

    Dim varPopup1MacroNames() As Variant
    Dim varPopup2MacroNames() As Variant
    Dim varPopup3MacroNames() As Variant
    Dim varPopup4MacroNames() As Variant
    Dim varPopup5MacroNames() As Variant
    Dim varPopup6MacroNames() As Variant
    Dim varPopup7MacroNames() As Variant
Now when adding these popups to the Add-Ins tab, I need to repeat the code for every popup instance which is messy and inefficient. I was wondering:
  1. whether a "parent" array could be used to hold all the popup arrays declared in the procedure?
  2. If yes to above, can it be worked so that I don't need to define the names/number of the popup arrays when adding to the parent array?
  3. How can I loop through the parent array to repeat the add ControlButtons code for each Popup array inside the parent array?
  4. Am I on the wrong track and should be looking at Collections instead (which I know next to nothing about)?