View Single Post
  #2   Report Post  
Posted to microsoft.public.excel,microsoft.public.excel.charting,microsoft.public.excel.misc,microsoft.public.excel.programming
Rob van Gelder[_4_] Rob van Gelder[_4_] is offline
external usenet poster
 
Posts: 1,236
Default Question on custom commandbars

Mark,

You're looking for the Temporary parameter, which prevents Excel being stuck
with it.

You can have the Auto_Close procedure destroy the toolbar too.

Const cCommandBar = "MyCommandBar"
Dim bar As CommandBar
For Each bar In Application.CommandBars
If bar.Name = cCommandBar Then bar.Delete
Next

I have an example for Commandbars he
http://www.vangelder.co.nz/excel/index.html

Rob


"Mark Reynolds" wrote in message
...
Hi All,
I have a question for the Excel experts. How do you get custom
commandbars to only open with a specific workbook, then close when the
workbook is closed? I already use an auto_open macro for certain
tasks. Would I insert commanbar = true statements into the macro? If
I did this, how would I get the commandbar(s) to automatically close
when I exit the workbook? Thanks for any help.
Mark