Unless you delete the toolbar it becomes part of the user's toolbar set and
takes on its own independent existence. When you re-open the workbook Excel
sees that there is already a toolbar with the same name as the one attached
to the workbook and the old, hidden one wins.
So you may get by by deleting the toolbar. There could be a problem however
if, for some reason like a macro error, your deleting routine does not run.
Then you'd have the same problem. For that reason I think most heavy
developers do not attach toolbars to files but rather create them through
code when the workbook opens. The Commandbars Add method has a "temporary"
argument that means the toolbar will not become permanent even if the
deleting code does not run.
--
Jim Rech
Excel MVP
"jordanctc " wrote in message
...
| Hey guys great site - I did a search and from everybody's contribution I
| found enough information to create dynamic file names and folders in my
| save as function - thanks.
|
| One difficulty I'm still having is that I created a new toolbar with an
| icon to run a macro. Essentially the macro creates a new workbook,
| populates the new wb with a query, sorts the data, enters formulas,
| formats table, saves new wb, and sets toolbar with macro button to
| visible=false. Essentially, I'm looking for the toolbar to show only
| when they have the one file that contains the macro open. I've tried
| attaching the toolbar to the file so it would appear everytime but it
| seems the setting visible to false in the macro is overriding the
| attaching when I reopen the file. So am I just a step or two away? Or
| do I need to totally attack this a different way?
|
| It's being developed in Excel 2002 (XP) SP2
|
| Thanks again,
| Jordan
|
|
|
| ---
| Message posted from
http://www.ExcelForum.com/
|