Combobox List

  • I have 2 combobox in userform
    Both the comboboxes have the same list down value and I have applied as follows

    combobox1.value = "Transport"
    combobox1.value = "Paper"
    combobox1.value = "Pencil"

    Like this I have long list

    In the combobox2 same list has been applied

    Is there a way in which by one command the list is applicable to both the comboboxes, that would save me on the length of VBA

  • Re: Combobox List

    I've corrected your code tags.

    Try this

    Option Explicit
    Private Sub UserForm_Initialize()
        With Me
            .ComboBox1.List = Array("Transport", "Paper", "Pencil")
            .ComboBox2.List = .ComboBox1.List
        End With
    End Sub
  • Re: Combobox List

    Sir I am aware of that but I was looking for some command in VBA, for eg. I do not know if it works or not

    combobox1.value and combobox2.value = "Pencil"

    like that or some sort of it

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!