Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Setting default menu bar via VBA

Status
Not open for further replies.

WillDDS

Programmer
Mar 11, 2002
2
US
How do I set the default Menu Bar to my own selection using VBA, to emulate changing that setting in the Startup Options dialog box? Will Ryder
~~~~~~~~~~~~~
Digital Data Systems
 
Code:
Sub InitMenuBar()
  Dim cbr As CommandBar
  
  For Each cbr In Application.CommandBars
    If cbr.Name = "MyCustomMenu" Then
      cbr.Visible = True
      cbr.Position = msoBarTop
    Else
      cbr.Visible = False
    End If
  Next cbr
End Sub
VBSlammer
redinvader3walking.gif

Unemployed in Houston, Texas
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top