"Ghost" Toolbar Icons


Posted by JAF on June 30, 2000 1:20 AM

I have a number of macros in my Personal Macro Workbook which I have assigned to new toolbar icons.

Ideally what I want to do is to "ghost" these icons whenever there is no workbook open, but for them to appear as normal when ANY workbook is open.

If this is not possible, is there any VBA code which I could incorporate into my custom macros - something along the lines of "if there is no workbook open then exit sub, else run code"?

Any ideas?


JAF



Posted by Ryan on June 30, 0100 1:26 PM

JAF,
What you'll have to do is write code for an application level event and have it count the number of workbooks and if it is 0 then to hide the toolbar, and if not to have it visible. Hope this helps.

Ryan