I am trying to populate a combo box with unique values, what am I doing wrong? Getting runtime error '381': Could not set the List property. Invalid property array index
errors out on this line: If LCase(frmMain.cmbCategory.List(r2)) = LCase(val) Then Exit Sub on the second pass, works during the first pass through though.
![]()
LR = Sheets(3).Range("C" & Rows.Count).End(xlUp).Row Sheets(3).Select For r = r To LR Step 1 val = Sheets(3).Range("C" & r2 + 2).value If LCase(frmMain.cmbCategory.List(r2)) = LCase(val) Then Exit Sub v = Sheets(3).Range("C" & r).value frmMain.cmbCategory.AddItem v, r2 r2 = r2 + 1 Next r
Bookmarks