Userform drop down list text/value pairs
Results 1 to 3 of 3

Thread: Userform drop down list text/value pairs
Thanks Thanks: 0 Likes Likes: 0

  1. #1
    New Member
    Join Date
    Jul 2014
    Posts
    23
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Userform drop down list text/value pairs

    Hi there,
    I have a VBA userform that has two drop down lists and a text box. I currently have the first drop down list populated with Low, Medium, High and the sceond drop down list with Likely and Unlikely.I have the drop downs linked to a 2 column dynamic range - the second column has numeric values against the text values.

    I would like the two numerical values multiplied and the answer to populate the text box.

    I am not sure how to do this?

  2. #2
    Board Regular
    Join Date
    Aug 2003
    Location
    England
    Posts
    5,567
    Post Thanks / Like
    Mentioned
    3 Post(s)
    Tagged
    1 Thread(s)

    Default Re: Userform drop down list text/value pairs

    Sorry, posted something that didn't work
    Last edited by onlyadrafter; Nov 26th, 2014 at 03:32 PM.
    -------------------------
    Hope this is helpful.
    -------------------------

    Have been away from the forum for quite a while, but am now back.

  3. #3
    Board Regular
    Join Date
    Aug 2003
    Location
    England
    Posts
    5,567
    Post Thanks / Like
    Mentioned
    3 Post(s)
    Tagged
    1 Thread(s)

    Default Re: Userform drop down list text/value pairs

    Hello,

    have assumed you are using Combobox's

    put this code into the Userform code window

    Code:
    Private Sub ComboBox1_Change()
        If ComboBox2.Value <> "" Then
            TextBox1.Value = ComboBox1.Value * ComboBox2.Value
        End If
    End Sub
    Private Sub ComboBox2_Change()
        If ComboBox1.Value <> "" Then
            TextBox1.Value = ComboBox1.Value * ComboBox2.Value
        End If
    End Sub
    for the two comboboxes, in the properties window, you will need to change BoundColumn to 2.
    -------------------------
    Hope this is helpful.
    -------------------------

    Have been away from the forum for quite a while, but am now back.

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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