This is the code I'm currently using:
On Error Resume Next
With Application.CommandBars("worksheet menu bar").Controls
("Tally")
With .Controls
With .Add(msoControlPopup)
.Caption = "Select Tally"
With .Controls
With .Add(msoControlButton)
.Caption = "Med/Dental Tally"
With .Controls
With .Add(msoControlButton)
.Caption = "Format Tally"
.OnAction = "FormatTally"
End With
With .Add(msoControlButton)
.Caption = "Add Tally Formulas"
.OnAction = "MakeFormulas"
End With
End With
End With
With .Add(msoControlButton)
.Caption = "Rx Tally"
With .Controls
With .Add(msoControlButton)
.Caption = "Format Rx Tally"
.OnAction = "rxFormattally"
End With
End With
End With
I modified this from an earlier menu I was using. I've
added another code module to my application, and I want to
use menus to allow my users to select the type of tally
(either Med/Dental Tally or Rx Tally) that they need to
create. What is currently happening is that a "Tally"
menu is created, the first level shows "Select Tally", and
then a submenu that shows "Med/Dental Tally" and "Rx
Tally", but nothing beyond that point. Once I can get
these commands working, I plan to add more commands under
each type of tally.
Thanks, Lee