Disable selecting certain items in listbox?
问题 I have an multiselect listbox that i need to disable users from selecting certain items in the listbox. I've tried looking at the listbox enable but that seems to be for the whole listbox only. Any ideas? Here's my listbox, i currently is looping through the item hoping to disable the item: Dim lItem As Long For lItem = 0 To Sheet1.ListBox1.ListCount - 1 If Sheet1.ListBox1.Selected(lItem) Then Sheet1.ListBox1.Enabled(lItem) = False ' don't work? End If Next 回答1: For it = 0 To Sheet1.ListBox1