Hi,
Can I use a combo box value (comboBox1.value) in Listbox Rowsource worksheet property? See example below:
With userForm1.Listbox1
.RowSource = userForm1.comboBox1.value & "!A1:B10"
.ColumnHeads = True
.ColumnCount = 2
.ColumnWidths = "100;120"
End With
I have several sheets with different lists. I want the program to populate Listbox1 depending on the value selected from comboBox1. I was able to successfully populate the list box by using the specific worksheet name (see below).
With userForm1.Listbox1
.RowSource = "Sheet1!A1:B10"
.ColumnHeads = True
.ColumnCount = 2
.ColumnWidths = "100;120"
End With
Thanks for any help.
Gugu
Can I use a combo box value (comboBox1.value) in Listbox Rowsource worksheet property? See example below:
With userForm1.Listbox1
.RowSource = userForm1.comboBox1.value & "!A1:B10"
.ColumnHeads = True
.ColumnCount = 2
.ColumnWidths = "100;120"
End With
I have several sheets with different lists. I want the program to populate Listbox1 depending on the value selected from comboBox1. I was able to successfully populate the list box by using the specific worksheet name (see below).
With userForm1.Listbox1
.RowSource = "Sheet1!A1:B10"
.ColumnHeads = True
.ColumnCount = 2
.ColumnWidths = "100;120"
End With
Thanks for any help.
Gugu