View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
ewagz ewagz is offline
external usenet poster
 
Posts: 29
Default Right click menu problem

I recently added the following code to a spreadsheet to add a right click
menu to run one of my forms/macros. The problem that I'm having is that it's
adding this to every spreadsheet and also adds each time so there are
multiple instances of the same right click menu item. I need some help
please!

Sub workbook_open()


Dim NewControl As CommandBarControl

Set NewControl = Application.CommandBars("Cell").Controls.Add
With NewControl
.Caption = "Add reservation"
.OnAction = "Module3.Cust_UF"
.BeginGroup = True
End With

End Sub


Any help would be appreciated!
--
EW - Analyst