I would like to make some macros available to users by adding items to an excel workbook menu bar. I have tried the sample code offered in the excel vba help menu (reproduced below). However I could not understand where the code needed to be placed so as to run when the spreadsheet is opened. Can somebody please assist with:
Where the code below needs to be placed.
Once the menu bar item has been added where will I find the subroutine associated with clicking on a menu bar item so that I can call the subroutines which will actually do the processing
Set menubar = CommandBars.Add _
(Name:="mBar", Position:=msoBarRight, MenuBar:=True)
.Protection = msoBarNoMove
.Visible = True