I have a combobox which is populating value from a table column. The column contains multiple rows including rows with duplicate values. I want the combobox to contain only unique values.
The code I used to populate combobox:
Set wb = Workbooks.Open(Filename:=ThisWorkbook.Path & "Data.xlsx")
Set sh = Worksheets("Sheet1")
Set tbl = sh.ListObjects("Table1")
combobox.list = tbl.ListColumns(1).DataBodyRange.Value
I tried using RemoveDuplicates but always gives a Type mismatch or Object Required error.