View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Andy Brown Andy Brown is offline
external usenet poster
 
Posts: 36
Default Positioning custom menu

I found some great code from Patrick Molloy for the above, controlled by
Workbook_Activate. Under normal circumstances it would place a new menu
before the Help menu, however I have (and others may also have) custom items
on the menu bar. I believe the section that controls the positioning is -

With CommandBars("Worksheet Menu Bar")
Set cmd = .Controls.Add(msoControlPopup, _
befo=.Controls.Count, _
temporary:=True)
End With
cmd.Visible = True

, presumably the "befo=.Controls.Count" bit, ie: one before however many
menu bar items there are.

Is there a way Excel can determine the actual number position of the Help
menu in the bar and place it there minus one?

TIA,
Andy