ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Preventing custom bars from appearing (https://www.excelbanter.com/excel-programming/386750-preventing-custom-bars-appearing.html)

Flint[_2_]

Preventing custom bars from appearing
 
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.

Peter T

Preventing custom bars from appearing
 
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

"Flint" wrote in message
...
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.




Flint[_2_]

Preventing custom bars from appearing
 
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

"Peter T" wrote:

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

"Flint" wrote in message
...
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.





Peter T

Preventing custom bars from appearing
 
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


"Flint" wrote in message
...
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

"Peter T" wrote:

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

"Flint" wrote in message
...
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.







Flint[_2_]

Preventing custom bars from appearing
 
Thanks a lot. I'll try that.

"Peter T" wrote:

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


"Flint" wrote in message
...
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

"Peter T" wrote:

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

"Flint" wrote in message
...
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.








All times are GMT +1. The time now is 12:37 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com