Reputation: 95
I have a Combo box on sheet1 of a excel workbook. I add some items to it during a process. Once I close the workbook all the items of Combo box are getting cleared. How to avoid this?
Public Sub ComboBox1_Change()
Dim ws As Worksheet
Dim match As range
Me.ComboBox1.AddItem range("C3").Value
End Sub
Upvotes: 2
Views: 389
Reputation: 51
Add items to a range in your worksheet, somewhere hidden, and define a name for that range. In the properties of the combobox under ListFillRange, write the name that you defined for that range.
Upvotes: 2