Results 1 to 2 of 2
  1. #1
    3 Star Lounger
    Join Date
    Aug 2002
    Location
    milton keynes, Buckinghamshire
    Posts
    252
    Thanks
    0
    Thanked 0 Times in 0 Posts

    adding a menu bar item (2003)

    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

    Thanks

    Alex
    Set menubar = CommandBars.Add _
    (Name:="mBar", Position:=msoBarRight, MenuBar:=True)
    With menubar
    .Protection = msoBarNoMove
    .Visible = True
    End With

  2. #2
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Weert, Limburg, Netherlands
    Posts
    4,812
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: adding a menu bar item (2003)

    See chapter 3 of my article about distributing macros:
    http://www.jkp-ads.com/Articles/DistributeMacro03.htm
    Jan Karel Pieterse
    Microsoft Excel MVP, WMVP
    www.jkp-ads.com
    Professional Office Developers Association

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •