Hi,
I have 2 listboxes (ListBox1 and ListBox2).
When I select something in listbox1, listbox2 deselects and vice versa.
I have tried these in listbox1 and listbox2 change and click events:
and
They work for the first selection but if I select in the same listbox twice it triggers the following error:
Run time error 380 - Could not set the selected property. Invalid property value.
Does anyone know a way around this error?
Also I should mention I have a code in userform activate that highlights a value and that value can be in either listboxes but never both.
Any help would be appreciated.
Thanks
Dan
I have 2 listboxes (ListBox1 and ListBox2).
When I select something in listbox1, listbox2 deselects and vice versa.
I have tried these in listbox1 and listbox2 change and click events:
Code:
ListBox1.Selected(ListBox1.ListIndex) = False
Code:
ListBox2.Selected(ListBox2.ListIndex) = False
They work for the first selection but if I select in the same listbox twice it triggers the following error:
Run time error 380 - Could not set the selected property. Invalid property value.
Does anyone know a way around this error?
Also I should mention I have a code in userform activate that highlights a value and that value can be in either listboxes but never both.
Any help would be appreciated.
Thanks
Dan