Consulting

Results 1 to 6 of 6

Thread: Solved: CommandBars.Add DropDown LinkedCell?

  1. #1

    Solved: CommandBars.Add DropDown LinkedCell?

    Hi.
    I was stuck here and need some advice!
    How to add for ControlDropdown LinkedCell or get DropDown Selected Item Text?

  2. #2
    VBAX Regular
    Joined
    Oct 2010
    Posts
    73
    Location

    DropDown

    HI,

    The following code may help.

    Sub mAction()
    Dim Thisitem As Integer
    Dim Thisname As String
       With CommandBars("newMenubar").Controls("OmaDrDwn")
        Thisitem = .ListIndex
        Thisname = .List(.ListIndex)
        End With
    End Sub

  3. #3
    Moderator VBAX Guru Simon Lloyd's Avatar
    Joined
    Sep 2005
    Location
    UK
    Posts
    3,003
    Location
    Charles, i just looked at his code and it seems he wants to set CommandBars("newMenubar").Controls("OmaDrDwn") to a linked cell G1. I may be wrong but i don't think there is a linked cell property for that control is there?
    Regards,
    Simon
    Please read this before cross posting!
    In the unlikely event you didn't get your answer here try Microsoft Office Discussion @ The Code Cage
    If I have seen further it is by standing on the shoulders of giants.
    Isaac Newton, Letter to Robert Hooke, February 5, 1675 English mathematician & physicist (1642 - 1727)

  4. #4
    VBAX Regular
    Joined
    Oct 2010
    Posts
    73
    Location
    Simon,

    I do not know about the "Linked" cells or if it's possible, but I think he also wanted the Text of the selected item in the dropdown. He may also mean when he makes a selection from the dropdown have that selection populate the sheet?
    My Time is valuable. The forum's time is valuable.
    So take time to say "Thanks"

    As with all programs there may be an easier way!
    CharlesH

  5. #5
    Moderator VBAX Guru Simon Lloyd's Avatar
    Joined
    Sep 2005
    Location
    UK
    Posts
    3,003
    Location
    Hmmm, without more interaction from him it's hopeless
    Regards,
    Simon
    Please read this before cross posting!
    In the unlikely event you didn't get your answer here try Microsoft Office Discussion @ The Code Cage
    If I have seen further it is by standing on the shoulders of giants.
    Isaac Newton, Letter to Robert Hooke, February 5, 1675 English mathematician & physicist (1642 - 1727)

  6. #6
    Thanks CharlesH and Simon Lloyd.
    [vba]
    Sub mAction()
    Dim Thisitem As Integer
    Dim Thisname As String
    With CommandBars("newMenubar").Controls("OmaDrDwn")
    Thisitem = .ListIndex
    Thisname = .List(.ListIndex)
    End With
    End Sub
    [/vba]

    That exactly what it needed.(Text of the selected item in the dropdown.)

    Sry my bad english.

Posting Permissions

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