Wow! When did the first mouse wheel appear? The first IntelliMouse with scroll wheel is from 1996, so it only took them 8 years…
![]() |
Patch reliability is unclear. Unless you have an immediate, pressing need to install a specific patch, don't do it. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |
-
Mousewheel in IDE Update (VB 6, VBA 6.0)
Home » Forums » AskWoody support » Productivity software by function » Visual Basic for Applications » Mousewheel in IDE Update (VB 6, VBA 6.0)
- This topic has 55 replies, 18 voices, and was last updated 17 years, 1 month ago.
Viewing 1 reply threadAuthorReplies-
WSMarkD
AskWoody LoungerJuly 24, 2004 at 12:27 pm #850692An update to an issue that was never resolved satisfactorily in several previous threads: Mousewheel not functioning in the VB or VBA IDE. Microsoft has finally seen fit to provide an explanation, and better yet, a solution to this annoyance, that does NOT involve having to buy one of their optical mice or installing the MS optical mouse drivers. See MSKB article 837910:
Mouse wheel events do not work in the Visual Basic 6.0 IDE
According to article, cause of problem is: “Mouse wheel support in Visual Basic 6.0 is a function of the mouse driver. The WM_MOUSEWHEEL message is sent to the Focus window when you rotate the mouse wheel. Because the Visual Basic 6.0 IDE does not have built-in support for scrolling by using the mouse wheel, the IDE ignores the WM_MOUSEWHEEL message.” To fix problem w/o having to install the MS Intellipoint drivers, article provides a link to download a compiled ActiveX .DLL you can register on your system, along with the VB6 project files with source code, in case you want to compile your own version of the project. Note that the .DLL provided by MS only works in VB6 IDE, not the VBA VB Editor IDE. To enable the mousewheel in VBA, make copy of project files, open project in VB6, double-click the Addin Designer module (Connect.Dsr). In Addin Designer dialog’s “Application” list, select “Visual Basic for Applications IDE” instead of “Visual Basic”, modify description, etc, as desired to reflect VBA vice VB. Save project, then compile as new .DLL (“Make…” on File menu). The new component will automatically be registered on your system. If distributing to other machines, register using regsvr32.exe as described in MSKB article. You should see “Mousewheel Fix” listed in the VBE Add-in Manager (as designed loads automatically on startup). I tested this on my system at work (WIN 2K, Office 2K, VBA 6.0) where I use Logitech optical mouse, and where mouse wheel has never functioned in VBA VB Editor, and I can now scroll away with impunity in code modules….
Note the code itself (Main.bas module), which works by hooking the mousewheel messages, requires no modification, as both VB and VBA IDE’s use same Windows class (“wndclass_desked_gsk”) and both include “Microsoft Visual Basic” in the Windows caption.
HTH
-
WSMatz
AskWoody LoungerJuly 14, 2004 at 9:35 pm #851405Hi, just wanted to say a THANKYOU!! for this post as it not only showed me how to sort out an (age old) problem – ie. scrolling in the VBE, but also along the way it showed me about compiling a .dll etc.!
The education continues, and my VBA now scrolls, what a satisifying day!!Woody’s Lounge – Solid man.
-
WSMarkD
AskWoody LoungerJuly 15, 2004 at 9:10 am #851600Glad this helped – I use an MS mouse at home (scroll wheel has always worked in VB Editor) but Logitech at work (scroll wheel did not work). While at work, I’d always being scrolling mouse wheel out of habit (like a dummy) in VBE and of course nothing would happen. This was always a MAJOR annoyance. I’m glad MS published a fix (at long last) but as HansV noted, mousewheels have been around a long time, you’d think Microsoft, with its armies of allegedly brilliant developers, would have fixed this in the first place – apparently a simple window hook procedure solves problem… anyway better late than never….
-
WSrory
AskWoody LoungerJuly 15, 2004 at 11:02 am #851611I use an MS mouse at work which worked intermittently at best with scrolling in the IDE (VB or VBA) but now it appears to work flawlessly so a big thanks to you!
Wonderful that Access developers have to contrive ways to disable the scrollwheel in forms while trying to re-enable it in other apps! -
WScharlotte
AskWoody Lounger -
WScharlotte
AskWoody Lounger
-
-
WSrory
AskWoody LoungerJuly 15, 2004 at 11:02 am #851612I use an MS mouse at work which worked intermittently at best with scrolling in the IDE (VB or VBA) but now it appears to work flawlessly so a big thanks to you!
Wonderful that Access developers have to contrive ways to disable the scrollwheel in forms while trying to re-enable it in other apps! -
WSDollyP
AskWoody LoungerJuly 27, 2004 at 8:16 am #856179Aagghh! It doesn’t work for me, what am I doing wrong? Yes I get scrolling but its almost uncontrollable. Scrolling doesn’t stop when I want it to and I can wait for ages whilst my code scolls past where I wanted to stop. Worse, my natural reaction is to scroll the other way, so when the first scrolling finishes my code then scrolls back past where I started.
It seems that instead of scrolling stopping when I release the mouse, I’ve ‘dialed in’ a set amount of scrolling. And its so slow.
How do I rid myself of this dll?
-
WSHansV
AskWoody LoungerJuly 27, 2004 at 8:30 am #856184The VB code window by default ignores the mouse wheel event. The DLL makes the VB code window “aware” of this event. The mouse wheel then should work the same way as in other applications. You can set some of its behavior in the Mouse control panel, for example the number of lines to scroll with a single notch of the mouse wheel.
You can turn off the add-in by selecting Add-In | Add-In Manager, and clearing both check boxes for the MouseWheel Fix. -
WSDollyP
AskWoody LoungerJuly 27, 2004 at 9:05 am #856198Hi Hans
The mousewheel DOES NOT work for me the same in the VBE as it does in other apps. If I scroll here in the lounge the screen scrolls; when I stop moving the mousewheel the scrolling stops. It’s virtually instant. Within the VBE if I move the mousewheel 10 clicks (set at 3 lines per click) it will scroll 30 lines and won’t stop until it has completed them.
Thanks for the ‘how to’ get rid of.
-
WSDollyP
AskWoody LoungerJuly 27, 2004 at 9:05 am #856199Hi Hans
The mousewheel DOES NOT work for me the same in the VBE as it does in other apps. If I scroll here in the lounge the screen scrolls; when I stop moving the mousewheel the scrolling stops. It’s virtually instant. Within the VBE if I move the mousewheel 10 clicks (set at 3 lines per click) it will scroll 30 lines and won’t stop until it has completed them.
Thanks for the ‘how to’ get rid of.
-
WSHansV
AskWoody LoungerJuly 27, 2004 at 8:30 am #856185The VB code window by default ignores the mouse wheel event. The DLL makes the VB code window “aware” of this event. The mouse wheel then should work the same way as in other applications. You can set some of its behavior in the Mouse control panel, for example the number of lines to scroll with a single notch of the mouse wheel.
You can turn off the add-in by selecting Add-In | Add-In Manager, and clearing both check boxes for the MouseWheel Fix.
-
-
WSDollyP
AskWoody LoungerJuly 27, 2004 at 8:16 am #856180Aagghh! It doesn’t work for me, what am I doing wrong? Yes I get scrolling but its almost uncontrollable. Scrolling doesn’t stop when I want it to and I can wait for ages whilst my code scolls past where I wanted to stop. Worse, my natural reaction is to scroll the other way, so when the first scrolling finishes my code then scrolls back past where I started.
It seems that instead of scrolling stopping when I release the mouse, I’ve ‘dialed in’ a set amount of scrolling. And its so slow.
How do I rid myself of this dll?
-
-
WSMarkD
AskWoody LoungerJuly 15, 2004 at 9:10 am #851601Glad this helped – I use an MS mouse at home (scroll wheel has always worked in VB Editor) but Logitech at work (scroll wheel did not work). While at work, I’d always being scrolling mouse wheel out of habit (like a dummy) in VBE and of course nothing would happen. This was always a MAJOR annoyance. I’m glad MS published a fix (at long last) but as HansV noted, mousewheels have been around a long time, you’d think Microsoft, with its armies of allegedly brilliant developers, would have fixed this in the first place – apparently a simple window hook procedure solves problem… anyway better late than never….
-
-
WSMatz
AskWoody LoungerJuly 14, 2004 at 9:35 pm #851406Hi, just wanted to say a THANKYOU!! for this post as it not only showed me how to sort out an (age old) problem – ie. scrolling in the VBE, but also along the way it showed me about compiling a .dll etc.!
The education continues, and my VBA now scrolls, what a satisifying day!!Woody’s Lounge – Solid man.
-
WSJanB
AskWoody Lounger -
WSJanB
AskWoody Lounger -
WSpieterse
AskWoody Lounger -
WSHansV
AskWoody LoungerOctober 23, 2007 at 12:03 am #851568Edited by HansV to replace attachment that was lost in server crash
The attached zip file contains the compiled DLL for the VBA editor (in Word, Excel etc.), named VBAIDEMouseWheelAddin.dll.
Unzip the DLL to a folder of your choice.
Select Start | Run…
Typeregsvr32 "C:pathVBAIDEMouseWheelAddin.dll"
(substitute the correct path) then press Enter.
That should install the add-in; open the Visual Basic Editor in any Office application to test.
You can turn the add-in on and off by selecting Add-Ins | Add-In Manager in the Visual Basic Editor. -
WSpieterse
AskWoody Lounger -
WSpieterse
AskWoody Lounger -
WSTonyE
AskWoody Lounger -
WSTonyE
AskWoody Lounger -
WSreimer
AskWoody Lounger -
WScharlotte
AskWoody Lounger -
WSreimer
AskWoody Lounger -
WScharlotte
AskWoody Lounger -
WSHansV
AskWoody LoungerDecember 28, 2004 at 1:04 pm #916579Chuck,
The VBA in Office 2000 and up is based on VB6, while the VBA in Office 97 is based on VB5.
The DLL I attached has been compiled for the Visual Basic Editor in Office 2000 and up. The VB6 compiler I am using does not provide an option to create a DLL for the Visual Basic Editor in Office 97, so I’m afraid I can’t help you. Sorry.
-
-
WSreimer
AskWoody Lounger -
WSHansV
AskWoody LoungerMarch 6, 2008 at 4:19 pm #1100836Update: I didn’t notice this before because I have the VBAIDEMouseWheelAddin.dll installed on all PCs I work on, but one of the Office updates during the second half of 2007 has enabled using the mouse wheel to scroll in the Visual Basic Editor in Office XP and 2003 (it was already enabled in Office 2007, and I don’t know about Office 2000).
So VBAIDEMouseWheelAddin.dll isn’t needed any more. If you installed it, you can turn it off in Add-Ins | Add-In Manager… in the Visual Basic Editor in any Office application (this will turn it off for all Office applications).
You can unregister the dll:
– Select Start | Run…
– Type the following, substituting the correct path of the dll:
regsvr32 /u "C:pathVBAIDEMouseWheelAddin.dll"
– Press Enter.
– If you wish, you can now delete the dll file. -
WSrory
AskWoody Lounger -
WSStuartR
AskWoody Lounger -
WSrory
AskWoody Lounger -
kdock
AskWoody PlusApril 23, 2008 at 1:04 am #1106551I hate to seem ungrateful, but this doesn’t seem to work all that well — it scrolls half the screen at a time and doesn’t seem to obey the scroll setting of mouse settings.
Or am I missing something? It wouldn’t be the first time…It does seem to scroll less when fewer lines are displayed, but I have to say I preferred VBAIDEMouseWheelAddin. Unfortunately, with the patch applied the addin doesn’t work any more.
I guess there’s always something for me to complain about.
Kim
-
WSHansV
AskWoody LoungerApril 23, 2008 at 1:18 am #1106555 -
kdock
AskWoody PlusApril 23, 2008 at 1:40 am #1106558Hmmm, not for me… I get 13 lines at a time and no apparent way to control them. I do have a Logitech bluetooth mouse with its own interface, but puttering with that doesn’t seem to affect it, either. If I use a different mouse, I still scroll 13 lines at a time. Bummer.
I have Office 2003 installed except for Outlook 2007. You mentioned that scrolling worked with 07 prior to 03. I wonder if there’s any kind of conflict there?
Oh well.
K
-
WSHansV
AskWoody Lounger
-
-
-
WSHansV
AskWoody LoungerOctober 23, 2007 at 12:03 am #851569Edited by HansV to replace attachment that was lost in server crash
The attached zip file contains the compiled DLL for the VBA editor (in Word, Excel etc.), named VBAIDEMouseWheelAddin.dll.
Unzip the DLL to a folder of your choice.
Select Start | Run…
Typeregsvr32 "C:pathVBAIDEMouseWheelAddin.dll"
(substitute the correct path) then press Enter.
That should install the add-in; open the Visual Basic Editor in any Office application to test.
You can turn the add-in on and off by selecting Add-Ins | Add-In Manager in the Visual Basic Editor.
-
-
WSpieterse
AskWoody Lounger -
WSD Willett
AskWoody Lounger -
WSD Willett
AskWoody Lounger -
WSDon Ceraso
AskWoody LoungerAugust 2, 2004 at 2:18 pm #858659(Edited by HansV to make URL clickable – see Help 19)
I like the idea, but if you split a code window horizontally, the mouse wheel makes both panes scroll.
I found an alternative here: http://www.gasanov.net/VBScroll.htm%5B/url%5D, which scrolls only the active pane,
and also has some other interesting settings. -
WSDon Ceraso
AskWoody LoungerAugust 2, 2004 at 2:18 pm #858660(Edited by HansV to make URL clickable – see Help 19)
I like the idea, but if you split a code window horizontally, the mouse wheel makes both panes scroll.
I found an alternative here: http://www.gasanov.net/VBScroll.htm%5B/url%5D, which scrolls only the active pane,
and also has some other interesting settings. -
WSRuff_Hi
AskWoody Lounger -
WSRuff_Hi
AskWoody Lounger -
WSjoelfinkle
AskWoody LoungerAugust 24, 2004 at 2:38 pm #868219I installed this, and initially loved it, but then noticed a lot of crashiness in Word shortly thereafter, usually while mousewheeling in the VBEditor.
Some of the crashes don’t even display the typical MS “Oops” dialog — application just plain closes! Lost some good work this way, and I’ve turned it off. Now I’m tryinig to figure out how to excise it all together.It’s possible it’s an interaction with one of my other add-ins in Word: RoboHelp, Acrobat and Reference Manager are all loaded. I’ve got a couple of the Office Developer add-ins too, but none of them are currently turned on.
Anyone else see this happen?
-
WSHansV
AskWoody Lounger -
WSHansV
AskWoody Lounger -
WSAndrew77
AskWoody LoungerAugust 25, 2004 at 7:11 pm #868895Hello all,
Came across the following while trying to find a way to get the scroll wheel to work in FrameMaker. As a bonus, it makes the scroll wheel work in the VBA IDE as well, and offers a few extra bells and whistles. Freeware.
http://www.geocities.com/SiliconValley/2060/freewheel.html%5B/url%5D
Enjoy!
-
-
WSjoelfinkle
AskWoody LoungerAugust 24, 2004 at 2:38 pm #868220I installed this, and initially loved it, but then noticed a lot of crashiness in Word shortly thereafter, usually while mousewheeling in the VBEditor.
Some of the crashes don’t even display the typical MS “Oops” dialog — application just plain closes! Lost some good work this way, and I’ve turned it off. Now I’m tryinig to figure out how to excise it all together.It’s possible it’s an interaction with one of my other add-ins in Word: RoboHelp, Acrobat and Reference Manager are all loaded. I’ve got a couple of the Office Developer add-ins too, but none of them are currently turned on.
Anyone else see this happen?
-
-
WSMarkD
AskWoody LoungerJuly 24, 2004 at 12:27 pm #850693An update to an issue that was never resolved satisfactorily in several previous threads: Mousewheel not functioning in the VB or VBA IDE. Microsoft has finally seen fit to provide an explanation, and better yet, a solution to this annoyance, that does NOT involve having to buy one of their optical mice or installing the MS optical mouse drivers. See MSKB article 837910:
Mouse wheel events do not work in the Visual Basic 6.0 IDE
According to article, cause of problem is: “Mouse wheel support in Visual Basic 6.0 is a function of the mouse driver. The WM_MOUSEWHEEL message is sent to the Focus window when you rotate the mouse wheel. Because the Visual Basic 6.0 IDE does not have built-in support for scrolling by using the mouse wheel, the IDE ignores the WM_MOUSEWHEEL message.” To fix problem w/o having to install the MS Intellipoint drivers, article provides a link to download a compiled ActiveX .DLL you can register on your system, along with the VB6 project files with source code, in case you want to compile your own version of the project. Note that the .DLL provided by MS only works in VB6 IDE, not the VBA VB Editor IDE. To enable the mousewheel in VBA, make copy of project files, open project in VB6, double-click the Addin Designer module (Connect.Dsr). In Addin Designer dialog’s “Application” list, select “Visual Basic for Applications IDE” instead of “Visual Basic”, modify description, etc, as desired to reflect VBA vice VB. Save project, then compile as new .DLL (“Make…” on File menu). The new component will automatically be registered on your system. If distributing to other machines, register using regsvr32.exe as described in MSKB article. You should see “Mousewheel Fix” listed in the VBE Add-in Manager (as designed loads automatically on startup). I tested this on my system at work (WIN 2K, Office 2K, VBA 6.0) where I use Logitech optical mouse, and where mouse wheel has never functioned in VBA VB Editor, and I can now scroll away with impunity in code modules….
Note the code itself (Main.bas module), which works by hooking the mousewheel messages, requires no modification, as both VB and VBA IDE’s use same Windows class (“wndclass_desked_gsk”) and both include “Microsoft Visual Basic” in the Windows caption.
HTH
Viewing 1 reply thread -

Plus Membership
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Get Plus!
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Search Newsletters
Search Forums
View the Forum
Search for Topics
Recent Topics
-
Trump signs Take It Down Act
by
Alex5723
7 hours, 38 minutes ago -
Do you have a maintenance window?
by
Susan Bradley
8 hours, 4 minutes ago -
Freshly discovered bug in OpenPGP.js undermines whole point of encrypted comms
by
Nibbled To Death By Ducks
9 hours, 12 minutes ago -
Cox Communications and Charter Communications to merge
by
not so anon
10 hours, 58 minutes ago -
Help with WD usb driver on Windows 11
by
Tex265
16 hours, 7 minutes ago -
hibernate activation
by
e_belmont
19 hours, 53 minutes ago -
Red Hat Enterprise Linux 10 with AI assistant
by
Alex5723
23 hours, 40 minutes ago -
Windows 11 Insider Preview build 26200.5603 released to DEV
by
joep517
1 day, 2 hours ago -
Windows 11 Insider Preview build 26120.4151 (24H2) released to BETA
by
joep517
1 day, 2 hours ago -
Fixing Windows 24H2 failed KB5058411 install
by
Alex5723
52 minutes ago -
Out of band for Windows 10
by
Susan Bradley
1 day, 7 hours ago -
Giving UniGetUi a test run.
by
RetiredGeek
1 day, 14 hours ago -
Windows 11 Insider Preview Build 26100.4188 (24H2) released to Release Preview
by
joep517
1 day, 22 hours ago -
Microsoft is now putting quantum encryption in Windows builds
by
Alex5723
8 hours, 7 minutes ago -
Auto Time Zone Adjustment
by
wadeer
2 days, 2 hours ago -
To download Win 11 Pro 23H2 ISO.
by
Eddieloh
2 days ago -
Manage your browsing experience with Edge
by
Mary Branscombe
1 hour ago -
Fewer vulnerabilities, larger updates
by
Susan Bradley
17 hours, 15 minutes ago -
Hobbies — There’s free software for that!
by
Deanna McElveen
23 hours, 39 minutes ago -
Apps included with macOS
by
Will Fastie
21 hours, 31 minutes ago -
Xfinity home internet
by
MrJimPhelps
18 hours, 18 minutes ago -
Convert PowerPoint presentation to Impress
by
RetiredGeek
1 day, 19 hours ago -
Debian 12.11 released
by
Alex5723
2 days, 23 hours ago -
Microsoft: Troubleshoot problems updating Windows
by
Alex5723
3 days, 3 hours ago -
Woman Files for Divorce After ChatGPT “Reads” Husband’s Coffee Cup
by
Alex5723
2 days, 6 hours ago -
Moving fwd, Win 11 Pro,, which is best? Lenovo refurb
by
Deo
10 hours, 29 minutes ago -
DBOS Advanced Network Analysis
by
Kathy Stevens
3 days, 20 hours ago -
Microsoft Edge Launching Automatically?
by
healeyinpa
3 days, 10 hours ago -
Google Chrome to block admin-level browser launches for better security
by
Alex5723
1 day, 8 hours ago -
iPhone SE2 Stolen Device Protection
by
Rick Corbett
3 days, 15 hours ago
Recent blog posts
Key Links
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.