Code fix need help please

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
 
G

Guest

Add this line of code...

ComboBox1.Clear

To clear any previous additions to the combo box.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top