ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to set off CommandBars (https://www.excelbanter.com/excel-programming/377940-how-set-off-commandbars.html)

hstijnen

How to set off CommandBars
 
Hi,

I've made an Excel 2000 application in a template. When starting a workbook
from the template I want to hide all the commandbars. I thougth this could be
done in the Workbook_Open() trigger:

For each cb in CommandBars
cb.Visible = false
nect cb

However, when the process of creating a workbook from the template arrives
at this code, the value of CommandBars is Nothing.

What can I do? When is that value known?

Thanks in advance,

Henk

Tom Ogilvy

How to set off CommandBars
 
For each cb in Application.CommandBars
cb.Visible = false
nect cb

--
Regards,
Tom Ogilvy

"hstijnen" wrote:

Hi,

I've made an Excel 2000 application in a template. When starting a workbook
from the template I want to hide all the commandbars. I thougth this could be
done in the Workbook_Open() trigger:

For each cb in CommandBars
cb.Visible = false
nect cb

However, when the process of creating a workbook from the template arrives
at this code, the value of CommandBars is Nothing.

What can I do? When is that value known?

Thanks in advance,

Henk



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

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