Try this code
Sub Select_ListBox_Items()
Dim ws As Worksheet, obj As Object, c As Range, m As Long, r As Long
Set ws = ThisWorkbook.Worksheets("Lists")
Set obj = ThisWorkbook.Worksheets("ListBox").ListBox21
m = ws.Cells(Rows.Count, "CS").End(xlUp).Row
With obj
For r = 0 To .ListCount - 1
.Selected(r) = False
Next r
End With
For Each c In ws.Range("CS4:CS" & m)
If c.Value <> "" Then
With obj
For r = 0 To .ListCount - 1
If c.Value = .List(r) Then .Selected(r) = True: Exit For
Next r
End With
End If
Next c
End Sub
Bookmarks