Prohibit mouse scrolling of listbox

I use a ComboBox for editing a Listbox cell. That way I can have a selectable list (built from text in other cells) and AutoComplete for typing. But when the ComboBox is in place and active, I can still scroll the Listbox behind it, causing confusion.

Is there a way to prohibit the Listbox from scrolling the the mouse? I tried disabling the scroll bar, but that doesn’t stop mouse scrolling. The Active property is read only. Is there some other way to stop the scrolling?

Thanks.

The docs aren’t showing it, but Listbox should have a MouseWheel event that you can return true to prevent the scroll.

You could try saving the scroll position when the cell goes into edit mode and then in the ListBox MouseWheel event do something like this:

If LockedScrollPosition >= 0 Then Me.ScrollPosition = LockedScrollPosition Return True End If

(I refreshed the cache for the ListBox page so it should now be showing the MouseWheel event again.)

Thanks, Tim. That does the trick very efficiently.