View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
James D. James D. is offline
external usenet poster
 
Posts: 3
Default Creating a menu in code

Many thx, this is what I needed.

"Tom Ogilvy" wrote:

Dim cb as Commandbar
On error resume next
set cb = Commandbars("Process")
On Error goto 0
if cb is nothing then
' create Process commandbar
end if

If Process is not a commandbar, but a button or something, just adjuste the
code, but the approach is the same.

--
Regards,
Tom Ogilvy

"James D." wrote in message
...
I have VBA code that create's a new menu bar called "Process". The Code

is
run when the worksheet opens. Problem is that it creates the menubar

each
time the worksheet opens thus giving me multiple identicle menus. I need
some code to test to see if the menu has indeed been created, and if so

not
to create it again. I have tried several different things with no luck.

Any
help would be greatly appreciated.

Thanks in advance.

James D.