How to enable mouse wheel scrolling for ListBox, ComboBox, Frame in VBA
VBA does not support mouse wheel scrolling for ListBox, ComboBox, Frame and UserForm. SonVuDev's MouseWheel for VBA fixes it with 1 .bas file and 2 lines of code, running on Excel, Access, Word, and PowerPoint.
You are writing VBA macros in Excel, Access, Word, or PowerPoint, and notice that ListBox / ComboBox / Frame scroll with the keyboard but not with the mouse wheel? That is not a software bug — it is a long-standing VBA limitation.
MouseWheel for VBA by SonVuDev solves it with 1 .bas file and 2 lines of code. No MSForms dependency, runs on any VBA host, and supports both 64-bit and 32-bit Office.
Why does VBA not scroll with the mouse wheel?
VBA is not .NET or WinForms — it is a legacy language deeply embedded in Office. Controls like ListBox, ComboBox, and Frame do not have a built-in message loop to catch WM_MOUSEWHEEL. When you scroll, Windows sends that message to the parent window (UserForm), but VBA does not forward it to the child control.
The result: you have to drag the scrollbar or use arrow keys — very inconvenient for long lists.
How to enable mouse wheel scrolling in VBA
- Download MouseWheel.bas from SonVuDev.
- Import the .bas file into your VBA project (Alt+F11 → File → Import File).
- In the
UserForm_Initializeevent, add 2 lines:Call MouseWheelEnable(Me)Call MouseWheelConfigure(Me, 3, True) - Run the form — the mouse wheel now works.
Key features
- No MSForms dependency: Control type is detected by duck typing, no reference needed.
- Runs on any VBA host: Excel, Access, Word, PowerPoint, VB6.
- 64-bit and 32-bit support: VBA7 (Office 64-bit) and VBA6 (Office 32-bit) both work.
- Tunable scroll speed: Use
MouseWheelConfigureto set lines per wheel notch. - Self-healing: If the hook install fails, it retries automatically — no stuck state.
- Safe hook release: Hook is released when leaving the control or closing the form.
- Optional diagnostics: Enable
EnableDebugorMWLogfor activity logging. - Platform capability reporting:
IsWheelSupportedandPlatformNametell you whether the current host supports it.
When should you use it?
- VBA forms with ListBox/ComboBox containing hundreds of rows.
- End users who are used to the mouse wheel and do not want to drag the scrollbar.
- Improving the UX of an internal VBA tool without rewriting it in .NET.
Conclusion
MouseWheel for VBA is a tiny, dependency-free, easy-to-integrate fix. If you write VBA and want your forms to scroll with the mouse, this is the right tool.