Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Change Combobox list to list more than 1 cell.value
The below code will list (conditionally) a value in the cell that is
..Offset(2, 0), But i am trying to get it to list ALL cell values from .Offset(2, 0) to ..Offset(22,0). How can i do this, the line highlighted is where the combobox is populated from: Private Sub ComboBox6_DropButtonClick() Application.ScreenUpdating = False 'Place the References in here for the Roll Numbers and Lengths Dim lastcell As Long Dim myrow As Long lastcell = workSheets("InspectionData").Cells(Rows.Count, "A").End(xlUp).Row With ActiveWorkbook.workSheets("InspectionData") ..Select 'first thing to do with a With statement that occurs on a second sheet For myrow = 2 To lastcell If .Cells(myrow, 1) < "" Then If .Cells(myrow, 1).Offset(-1, 2).Text = ComboBox28.Text And ..Cells(myrow, 1).Offset(-1, 6).Text = ComboBox1.Text And IsNumeric(Trim(Mid(.Cells(myrow, 1), 2))) = True Then ComboBox6.AddItem Cells(myrow, 3).Offset(2, 0) ' <======= How do i get this result to Display what is in .Offset(2,0) to .Offset(22,0) Ie. The range.... End If End If Next End With End Sub Regards Corey.... |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Change Combobox list to list more than 1 cell.value
Also,
In relation to this POST: Is it possible to add into the Conditions for these values to be populated into the combobox, a step to STRIKETHROUGH the value if it was selected. Then each subsequent record to ONLY populate the combobox list with values that ARE NOT STRIKETHROUGH ? Once a value has been used i do not want it to be populated in the combobox again, yet i do not want to delete the value altogether, as i need it for reviewing at later times. Corey.... "Corey" wrote in message ... The below code will list (conditionally) a value in the cell that is .Offset(2, 0), But i am trying to get it to list ALL cell values from .Offset(2, 0) to .Offset(22,0). How can i do this, the line highlighted is where the combobox is populated from: Private Sub ComboBox6_DropButtonClick() Application.ScreenUpdating = False 'Place the References in here for the Roll Numbers and Lengths Dim lastcell As Long Dim myrow As Long lastcell = workSheets("InspectionData").Cells(Rows.Count, "A").End(xlUp).Row With ActiveWorkbook.workSheets("InspectionData") .Select 'first thing to do with a With statement that occurs on a second sheet For myrow = 2 To lastcell If .Cells(myrow, 1) < "" Then If .Cells(myrow, 1).Offset(-1, 2).Text = ComboBox28.Text And .Cells(myrow, 1).Offset(-1, 6).Text = ComboBox1.Text And IsNumeric(Trim(Mid(.Cells(myrow, 1), 2))) = True Then ComboBox6.AddItem Cells(myrow, 3).Offset(2, 0) ' <======= How do i get this result to Display what is in .Offset(2,0) to .Offset(22,0) Ie. The range.... End If End If Next End With End Sub Regards Corey.... |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
.AddItem list and populating combobox with created list | Excel Discussion (Misc queries) | |||
Combobox list to leave ONLY related values in list ?? | Excel Programming | |||
Combobox List to list Numerical Values ONLY in Column A is specific Sheet.... | Excel Programming | |||
change a vertical list of numbers to horizontal list from 1 cell | Excel Discussion (Misc queries) | |||
How Do I Get A ComboBox To Add Entry To It's List If Not In List | Excel Programming |