Code fix need help please

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am using this code to fill a combobox list. However, somehow the values are
getting added onto previous values and the range is not emptying before it
adds items. How do I fix this.

Dim thiscel As Range

ComboBox1.ListFillRange = ""

For Each thiscel In Sheets("Defaults").Range("R344:R362")
If Len(thiscel) > 0 Then
Sheets("Input").ComboBox1.AddItem thiscel.Value
End If
Next
 
Add this line of code...

ComboBox1.Clear

To clear any previous additions to the combo box.
 
Back
Top