Results 1 to 4 of 4
  1. #1
    2 Star Lounger
    Join Date
    Sep 2003
    Location
    Toronto, Ontario, Canada
    Posts
    124
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Menus in VBA (Excel 2003)

    Is is possible to create menus on a user form in VBA?
    I remember is being very easy in VB - all you had to do was goto the menu editor. I havent been able to find this feature in VBA.

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Menus in VBA (Excel 2003)

    No, not really. You can fake it somewhat by using labels and handling their click events, but there is no VBA forms equivalent to the VB menus. Instead, you create the menus at the application level and they appear with the menus in the parent window.
    Charlotte

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

    Re: Menus in VBA (Excel 2003)

    You can fake it as well by creating a custom popup commandbar, which you show in the click event of a label. See <post#=237159>post 237159</post#>
    BTW: there is an error in the code, change this line:

    With CommandBars.Add(Name:="NamesMenu Popup", Position:=msoBarPopup, temporary:=True)

    To:

    With CommandBars.Add(Name:="YourMenu Popup", Position:=msoBarPopup, temporary:=True)
    Jan Karel Pieterse
    Microsoft Excel MVP, WMVP
    www.jkp-ads.com
    Professional Office Developers Association

  4. #4
    Gold Lounger
    Join Date
    Dec 2000
    Location
    New Hampshire, USA
    Posts
    3,386
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Menus in VBA (Excel 2003)

    if u also have vb 6, you can create the firm in vb 6 and run the vba code from vb 6.
    the code can be compiled which results in fastr code and th code is protected from prying eyes.

Posting Permissions

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