+ Reply to Thread
Results 1 to 1 of 1

Custom Right Click Menu

Hybrid View

jharaldson Custom Right Click Menu 08-26-2012, 10:40 PM
  1. #1
    Registered User
    Join Date
    12-09-2011
    Location
    Sioux Falls, South Dakota
    MS-Off Ver
    Excel 2007
    Posts
    46

    Custom Right Click Menu

    I created a custom right click menu for my excel sheet and was wondering if anybody could help me with getting the name on the drop down menu to appear in a cell on the sheet when clicked/selected. I have multiple items listed. Here is how i add the the items to the drop down.
    Set cbr = Application.CommandBars.Add(cstrBarName, msoBarPopup, , True)
        ' add a couple of buttons
        Set ctl = cbr.Controls.Add
        With ctl
            .Caption = L1
            .OnAction = "'" & ThisWorkbook.Name & "'!macro1"
            .Style = msoButtonCaption
        End With
        Set ctl = cbr.Controls.Add
        With ctl
            .Caption = L2
            .OnAction = "'" & ThisWorkbook.Name & "'!macro2"
            .Style = msoButtonCaption
        End With
        Set ctl = cbr.Controls.Add
        With ctl
            .Caption = L3
            .OnAction = "'" & ThisWorkbook.Name & "'!macro2"
            .Style = msoButtonCaption
        End With
    Thanks
    Jeremy
    Last edited by jharaldson; 08-26-2012 at 10:53 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1