View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
HK[_4_] HK[_4_] is offline
external usenet poster
 
Posts: 6
Default Macros in Toolbar

"HK" wrote in message
...
"Robin Hammond" wrote in message
...
In theory, you can create a custom toolbar and attach it to a
spreadsheet.

Goto View, Toolbars, Customise, and use the Attach button.

I say in theory because it is not always reliable. For complex toolbars,
many of us will build the toolbar through code rather than relying on the
attachment. Still, give it a try and see if it works.


Attaching seems to work as long as one uses the same version of excel
stored locally on your own C-drive. If one has stored the excel e.g. on
some database and then downloads the latest version of excel (even though
the custom commands have not changed), the commands in the custom toolbar
do not work anymore. It is easy to fix however, go to the "toolbar view"
and delete the custom tools from the toolbar, close the excel and open it
again. Now the tools are visible again and the commands work. I suppose
this has to do with the excel**.xlb file.

Is there any way I could automate the above procedure to recover the
custom toolbar? I would prefer not to use a macro for this because this
means that I cannot have the macro available in the custom made toolbar.
Or is someone aware of some other clever(er) way to recover the custom
toolbar commands?


Would it be possible to embed the xlb file in the excel somehow and make
Excel save the file in the appropriate directory?

HK