Hello,
I've been running into a rather inconsistent and frustrating problem for the past couple of days while on my userform.
My userform consists of a series of listboxes that filter a table depending on the user's selection in the listbox.
The problem is that sometimes after selecting an item in one listbox, the entire userform appears to lose focus such that the user can't select items in other listboxes unless I right-click the userform.
My userform is modeless, I've tried sending right clicks via send keys, tried activating the workbook containing the macro hoping that that solves the problem, and have tried some APIs from the windows library
but these don't seem to work. The most frustrating part is that this appears to be rather inconsistent where sometimes I'm able to select other listboxes and other times I can't. The only consistent way of fixing this problem is if the user right clicks the userform but this gets annoying.
If this is potentially due to the events that occur upon listbox selection, I'm processing the listbox item selection in the following manner: Item selected => mousedown event is called. If listbox is single select, then run mouseup event else run listbox change event occurs if the listbox is multiselect.
Would attach the macro itself if it wasn't for the fact that it's a bit lengthy and catered specifically to sensitive data from a table.
I've been running into a rather inconsistent and frustrating problem for the past couple of days while on my userform.
My userform consists of a series of listboxes that filter a table depending on the user's selection in the listbox.
The problem is that sometimes after selecting an item in one listbox, the entire userform appears to lose focus such that the user can't select items in other listboxes unless I right-click the userform.
My userform is modeless, I've tried sending right clicks via send keys, tried activating the workbook containing the macro hoping that that solves the problem, and have tried some APIs from the windows library
but these don't seem to work. The most frustrating part is that this appears to be rather inconsistent where sometimes I'm able to select other listboxes and other times I can't. The only consistent way of fixing this problem is if the user right clicks the userform but this gets annoying.
If this is potentially due to the events that occur upon listbox selection, I'm processing the listbox item selection in the following manner: Item selected => mousedown event is called. If listbox is single select, then run mouseup event else run listbox change event occurs if the listbox is multiselect.
Would attach the macro itself if it wasn't for the fact that it's a bit lengthy and catered specifically to sensitive data from a table.