My application has a CommandBar. The buttons call macros that then call
another macro in the active workbook. This as multiple workbooks could be
open, and I want the single toolbar to work with whichever is active. When
a workbook is closed, it loops and activates all the other open workbooks,
and if it finds another of its type it does not delete the CommandBar. But
this causes a problem. The CommandBar that is visible could belong to a now
closed workbook. So clicking a button tries to open the workbook so it can
call the first level macro. What I need to determine when a workbook is
closed is whether the toolbar belongs to it. And if so, it has to close the
toolbar and another still open workbook has to recreate it. Or is there
some simpler way that I'm not seeing?

Don <donwiss at panix.com>.