Yeah looping the layers is not a problem, that part is working well.
But If I could have gotten the layer name as a string I could have automatically disabled the event group connected to that layer since I use similar naming technique with groups as well.
I have named the layers "UI_Menu_" & group name. This enables me to activate the selected group with a string variable set as the event group name, but disabling the layer groups is more tricky. I guess I just need to use 2 strings, one for active group name and one for the group last activated before the current group was activated. That isn't so bad, but getting the layer names would have simplified it.