I’ve just had to set up a new PC and, for a few minutes there, was confused as to why the scroll wheel did not work in the VBA code window.
Then I remembered that VBA is based on the Microsoft Visual Basic 6 IDE which doesn’t include built-in support for the scroll wheel.
After a little searching I found the following article on the Microsoft site: http://office.microsoft.com/en-us/access/HA101175901033.aspx (opens in new window)
In short, to enable the mouse wheel scrolling behaviour in the VBA window, you must download a package from Microsoft at http://office.microsoft.com/search/redir.aspx?AssetID=XT101665991033&CTT=5&Origin=HA101175901033 (opens in new window) and then do the following:
- Run the downloaded executable to extract the files
- Add the included DLL to your machine
- Register the DLL using RegSvr32
- Run the included registry file to add the required elements to your machine’s registry (remembering to take a backup of the registry first of course)
- Add the MouseWheel Fix to your VBA project using the Add-In manager
Now the scroll wheel should work in your VBA code!
0 Responses to “Enabling Mouse Scrolling In VBA”