I created a Userform in Excel VBA that has an unrelated list that has the MultiSelect property set to Extended. When this list receives focus by any means other than clicking on a list item, all the items in this list are displayed with a rectangle with focus points around them.
Here is some code that shows a phenomenon next to another list for which MultiSelect is set to Single for comparison. Create a Userform, place two lists on it and add the code to the form. When you run the form, go to the tab between the lists to see what I described.
Private Sub UserForm_Activate() ListBox1.MultiSelect = fmMultiSelectSingle ListBox2.MultiSelect = fmMultiSelectExtended Dim i As Integer For i = 1 To 15 ListBox1.AddItem String(i, Chr(i + 64)) ListBox2.AddItem String(i, Chr(i + 64)) Next End Sub
Is there a way to remove focus rectangles or prevent them from appearing?
Thanks,
source share