Restoring Attached Toolbar

S

Steve

I have an application that deletes my attached toolbar when the file is
closed. The problem I am having is when two files, using the same toolbar,
are opened, and one is then closed, the toolbar is deleted. When I go to the
view\toolbars\customize\attach window, it shows that the toolbar is still in
the workbook. I have tried using "Application.CommandBars("Equipment
List").Enabled = True", but that doesn't work. Is there a way I can restore
the toolbar without having to close, and re-open?

Thanks,
Steve
 
D

Dave Peterson

I wouldn't attach a toolbar to a workbook.

I'd build another workbook (an addin???) that contained the code to build the
toolbar and the code for each of the macros.

And I'd load that workbook/addin whenever I opened a workbook that needed those
macros.

And by separating the code from each of the individual data workbooks, I only
have one location to update when the code needs to change.

If you like that idea...

For additions to the worksheet menu bar, I really like the way John Walkenbach
does it in his menumaker workbook:
http://j-walk.com/ss/excel/tips/tip53.htm

Here's how I do it when I want a toolbar:
http://www.contextures.com/xlToolbar02.html
(from Debra Dalgleish's site)

And if you use xl2007:

If you want to learn about modifying the ribbon, you can start at Ron de Bruin's
site:
http://www.rondebruin.nl/ribbon.htm
http://www.rondebruin.nl/qat.htm -- For macros for all workbooks (saved as an
addin)
or
http://www.rondebruin.nl/2007addin.htm

In xl2007, those toolbars and menu modifications will show up under the addins.
 
S

Steve

I considered that when I first started developing my application. I didn’t
know if I wanted to get caught with numerous versions of the toolbar as the
application evolved. In hindsight, I find that it’s the code that’s changing
more often than the application.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top