> The essence of my script implies that after pressing OK and thus calling > the Apply function the bar isn't needed anymore. But if I just move the > > *Bar Close MyBar > > command before the execution loop (after the "static Len ..." command),
If I understand you properly, this would move the bar close before the for loop. That would make the cl.getctrlvalue unreliable, since the checkboxes are children of the bar window and so are closed when it is closed. You need to keep the bar open as long as you want to access any controls. But it does not have to be visible to be open. Try hiding it with bar hide at the top of the loop. Then close it at the end.
