ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Menu Bars (https://www.excelbanter.com/excel-programming/338848-menu-bars.html)

Neil Hopkinson[_2_]

Menu Bars
 
Hello,

I have written a macro to produce a new menu bar. However in some cases it
may already exist. I am struggling to write a pice of code that loops through
the current menu bars and identifies if a specific bar is already present.
Any Thoughts?

Many Thanks

Ron de Bruin

Menu Bars
 
Hi

You can do this before you create it


On Error Resume Next
Application.CommandBars("MyToolBar").Delete
On Error GoTo 0

' Your code that create the bar


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Neil Hopkinson" wrote in message
...
Hello,

I have written a macro to produce a new menu bar. However in some cases it
may already exist. I am struggling to write a pice of code that loops through
the current menu bars and identifies if a specific bar is already present.
Any Thoughts?

Many Thanks





All times are GMT +1. The time now is 03:46 AM.

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