C
Corey
The below code populates a Combobox from the selected value in Textbox2.
But i found if i change the value in Texbox2, the List STILL has the other
values from the previous list adding them to the new list.
How can i make sure when/If a value in Textbox2 is modified ONLY those
vlaues are listed ?
Private Sub TextBox2_Change()
Application.ScreenUpdating = False
With ActiveWorkbook.Worksheets("names")
On Error Resume Next
For i = 3 To 21
If .Cells(i, Val(TextBox2.Value)).Value <> "" Then
ComboBox3.AddItem .Cells(i, Val(TextBox2.Value))
End If
Next i
End With
Application.ScreenUpdating = True
End Sub
Corey....
But i found if i change the value in Texbox2, the List STILL has the other
values from the previous list adding them to the new list.
How can i make sure when/If a value in Textbox2 is modified ONLY those
vlaues are listed ?
Private Sub TextBox2_Change()
Application.ScreenUpdating = False
With ActiveWorkbook.Worksheets("names")
On Error Resume Next
For i = 3 To 21
If .Cells(i, Val(TextBox2.Value)).Value <> "" Then
ComboBox3.AddItem .Cells(i, Val(TextBox2.Value))
End If
Next i
End With
Application.ScreenUpdating = True
End Sub
Corey....