Preventing custom bars from appearing

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

When I open an Excel workbook there is always the last version of the custom
toolbar I created. How do I prevent Excel from storing the toolbars from the
workbooks I open, so that I don't have to delete them every single time?
Thanks.
 
I take it your workbook adds a custom toolbar in its open event. Include the
"Temporary:=True" argument in Commandbars.Add (see help), and/or in the wb's
close event delete the toolbar.

Regards,
Peter T
 
Thanks, Peter. I should have been more explicit. The workbook, once used, is
saved with another name, and that file needs to keep the toolbar attached.
The problem is that anytime anyone opens Excel the toolbar is there. But if I
delete it when closing then I can't keep it for the original and copies of my
workbook.
Is there a solution?

Thanks,
Flint
 
Hi Flint,

As Excel closes the current toolbar settings are saved to the toolbar file
(*.xlb). When Excel next opens the toolbars are read from that file.

If you don't want your toolbar available in the next session it will need to
be deleted before Excel is closed. Normally delete in the close event of the
workbook in which the toolbar is attached. The wb of course would need to
have been saved once with the attached toolbar.

If you want the toolbar to remain after closing the workbook but before
closing Excel, delete the toolbar in the close event of an addin or
Personal.xls.

BTW, if you want to attach a toolbar to a wb, don't create it with
temporary:= true as I suggested earlier.

Regards,
Peter T
 
Thanks a lot. I'll try that.

Peter T said:
Hi Flint,

As Excel closes the current toolbar settings are saved to the toolbar file
(*.xlb). When Excel next opens the toolbars are read from that file.

If you don't want your toolbar available in the next session it will need to
be deleted before Excel is closed. Normally delete in the close event of the
workbook in which the toolbar is attached. The wb of course would need to
have been saved once with the attached toolbar.

If you want the toolbar to remain after closing the workbook but before
closing Excel, delete the toolbar in the close event of an addin or
Personal.xls.

BTW, if you want to attach a toolbar to a wb, don't create it with
temporary:= true as I suggested earlier.

Regards,
Peter T
 
Back
Top