View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Lakehills Lakehills is offline
external usenet poster
 
Posts: 7
Default How can I check if a pop-up menu exists...

Hi All,

Help with another (probably easy for you all) question. I use the code
below to add a pop-up menu that runs a macro.

On Error Resume Next
With Application
.CommandBars("Cell").Controls("GICAP Formatter").Delete
Set cBut = .CommandBars("Cell").Controls.Add(Temporary:=False )
End With

With cBut
.Caption = "GICAP Formatter"
.Style = msoButtonCaption
.OnAction = "FormatIssuesWorkSheet"
End With

What I need to know is how to check if the pop-up menu exists the next
time the workbook is opened? The "on error" process doesn't work for me
in this case because I need this check in the middle of a subroutine.
However, I continue in the subroutine whether it exists or not.

Can someone help?

Thanks,
Chris