Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I need to populate a new combobox with a list of ranges. I have one
combobox that works with one range "Main" but I have 4 other ranges on the worksheet that I need to inlcude. So for example, I will choose the range "Main" with one combobox and the data from the rowsources will show up on the userform text box part. Is there a simple way to add a second combobox for the additional ranges ? Here is my current code below: Assuming I can get some guidance, I will be creating a second combobox for the ranges.. thanks for any help.. Private Sub ComboBox1_Change() 'If we're initialize then all txt boxes are blank, don't write If Not Initialize Then SaveRow End If 'Set current row lCurrentRow = ComboBox1.ListIndex + 6 'LoadRow based off new current row LoadRow 'Load TextBoxes Set rng = Range(Range("Main").Offset(3), _ Range("Main").Offset(3).End(xlDown)) 'Range(ComboBox1.RowSource) txtReqNum.Text = rng(ComboBox1.ListIndex + 1)(1, 1) txtDateOpen.Text = rng(ComboBox1.ListIndex + 1)(1, 2) txtType.Text = rng(ComboBox1.ListIndex + 1)(1, 4) txtPriority.Text = rng(ComboBox1.ListIndex + 1)(1, 5) txtTitle.Text = rng(ComboBox1.ListIndex + 1)(1, 6) txtGrd.Text = rng(ComboBox1.ListIndex + 1)(1, 7) txtExpected.Text = rng(ComboBox1.ListIndex + 1)(1, 10) txtNR.Text = rng(ComboBox1.ListIndex + 1)(1, 11) txtManager.Text = rng(ComboBox1.ListIndex + 1)(1, 12) txtDept.Text = rng(ComboBox1.ListIndex + 1)(1, 13) txtRecr.Text = rng(ComboBox1.ListIndex + 1)(1, 14) txtStatus.Text = rng(ComboBox1.ListIndex + 1)(1, 15) txtCandidate.Text = rng(ComboBox1.ListIndex + 1)(1, 16) End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
.AddItem list and populating combobox with created list | Excel Discussion (Misc queries) | |||
Populating a list box with specific ranges | Excel Programming | |||
Populating a ComboBox in a UserForm | Excel Programming | |||
Populating a ComboBox | Excel Programming | |||
populating one list/combobox based on the results of another | Excel Programming |