This ranks right at the top of annoyances when it comes to working with the VBA IDE – the mouse scroll wheel simply does not work. So if you have more lines of code than can fit into a single screen in the VBA IDE, you end up having to drag the scroll bar to up/down to navigate. Jimmy Peña recently posted this very useful VBA tip on his informative blog that provides the solution to this issue. (Read more about this at microsoft help.)
It took me a bit of a time to get this right especially adding the addin to DLL registry server. Here is a stepwise tutorial on how you can make the mouse scroll wheel work with the VBA IDE:
1. Download the vb6mousewheel.exe from the microsoft site and save to local drive.
2. Once the download is complete, double click on the exe. Click on Ok when the end user agreement message appears.
3. Extract the files to a local folder.
4. Copy the file VB6IDEMouseWheelAddin.dll to a stable location. I used D:\Program Files\Microsoft Office\OFFICE11 which is one of the program folders used by MS-Office and which I am sure I am not likely to delete in a hurry.
5. Now press Win + R (The windows key on the keyboard + r) OR Click “Start” -> “Run”. In the box type “cmd” and press enter.
6. We will now need to register the the DLL (that we copied to the office folder earlier) with windows. In the command line, move to the folder where the VB6IDEMouseWheelAddin.dll has been copied.
7. When you reach the folder where the file has been copied, enter the following:
regsvr32 VB6IDEMouseWheelAddin.dll
You will get the following message:
8. We will now add the DLL’s information to the windows registry. Go back the folder where we extracted all the files in point 3 above. Double click on the VBA Mouse Wheel Fix.reg. This will add the information to the windows registry. Click Yes when prompted for “Are you sure that you want to add the information in~” message box. Once you’ve done that you will get the following confirmatory message.
9. The only step that needs to be carried out now if to go ahead and add the DLL as an addin the VBA Editor (IDE). Open a blank excel sheet and open the VBA editor. On the menubar, click “Add-Ins” -> “Add-In Manager”.
In the Add-In box that appears, turn on both the “Loaded/Unloaded” and “Load on Startup” checkbox. Press Ok.
That’s about it. You code in the VBA Editor (IDE) should now be scrolling properly.
There are numerous small utilities that do the same. One which is easy to use and has a much smaller footprint than the one cited above is VB Scroll:
http://www.gasanov.net/VBScroll.asp
July 14th, 2009 at 6:54 amThanks for this awesome help. My mouse not scrolling in the VBA window was just bugging me.. Thanks to you it solved the problem.
July 23rd, 2009 at 9:13 pmGlad this was of help. Welcome to da TaB !
July 23rd, 2009 at 10:46 pmWow…
This made my life so easy as I am mostly involved in creating macros in Excel…
Thanks for the help…
July 29th, 2009 at 8:28 amGlad this was of help and welcome to da TaB !
July 29th, 2009 at 12:32 pmYou are awesome! Thanks heaps
August 4th, 2009 at 1:23 amThanks Miron and welcome to da TaB !
August 4th, 2009 at 3:11 pmVery helpful, fedup without this option.
December 3rd, 2009 at 1:50 amThanks a bunch 🙂
Awesome! Thanks for the very useful info. Not being able to scroll through all this VBA code was just . . . unacceptable! This is so much better.
March 27th, 2015 at 9:52 amThank you thank you. Had to get the vb6mousewheel.exe from another computer as MS seems to have hidden it, but now everything works. Still on XP Pro SP3, but will (reluctantly) downgrade to Windows 10 soon….
July 31st, 2015 at 8:16 pmThanks for help. Awesome!!
February 2nd, 2019 at 9:39 am