ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How can I prevent users from deleting an Excel toolbar from a work (https://www.excelbanter.com/excel-programming/318668-how-can-i-prevent-users-deleting-excel-toolbar-work.html)

BillBreck

How can I prevent users from deleting an Excel toolbar from a work
 
I've written some VBA code that creates a custom toolbar within an Excel 2000
workbook when it is opened. I would like to protect the toolbar so that it
can't be deleted, but don't see anything that will work. Any suggestions?

Jim Cone

How can I prevent users from deleting an Excel toolbar from a work
 
Bill,

Here is a suggestion...

Set MyCustomToolBar = Application.CommandBars.Add(...
MyCustomToolBar.Protection = msoBarNoCustomize

This doesn't hurt either...
Application.CommandBars("Toolbar List").Enabled = False
(Reset this on closing the workbook)

Regards,
Jim Cone
San Francisco, USA

"BillBreck" wrote in message ...
I've written some VBA code that creates a custom toolbar within an Excel 2000
workbook when it is opened. I would like to protect the toolbar so that it
can't be deleted, but don't see anything that will work. Any suggestions?



All times are GMT +1. The time now is 07:18 AM.

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