# Visual Basic > Visual Basic FAQs >  Classic VB - How can I use the mouse-wheel in VB?

## si_the_geek

VB6 was released in 1998, before mice with wheels were generally available.  Due to this, there is no built-in support for the mouse-wheel within most of VB6 (either in VB itself, or in your programs).


The code window in VB cannot be scrolled with the wheel, which can be frustrating!  Luckily this can be 'fixed' fairly easily, see the following Microsoft article for instructions:  http://support.microsoft.com/kb/837910


To make use of the mouse-wheel in your program (including several of the built-in controls) you will need to write fairly complex code, incorporating a few API's.

This may sound a bit daunting, but in the CodeBank forum there is a great piece of code already written for you: VB6 - MouseWheel with Any Control.

----------


## RhinoBull

> ...Luckily this can be 'fixed' fairly easily, see the following Microsoft article for instructions:  http://support.microsoft.com/kb/837910


After many attemps I dumped it - couldn't get it done. So, in my opinion it's just doesn't work.
However, there is another utility made by Logitech (Mouseware) that actually works without any problem on any platform and is very simple to configure - you simply install it by running the Setup file.
It could be downloaded directly from Logitech.

----------


## krtxmrtz

> After many attemps I dumped it - couldn't get it done. So, in my opinion it's just doesn't work....


Maybe it didn't work at that time but I just tried it out and it worked.

----------


## danisa

Here is my two cents...
The MS Fix works...BUT it manage to full me for a while.

Download the MouseFix file from the MS link above.

Extract the downloaded file to temp folder...
Copy  VB6IDEMouseWheelAddin.dll    from temp folder to C:\
Click Start, click Run, and type or copy paste from here:

regsvr32 C:\VB6IDEMouseWheelAddin.dll

then click OK.

Start Visual Basic 6.0.
Click Add-Ins in the Toolbar, and then click Add-in Manager from the drop down menu.
In the Add-in Manager list, click "MouseWheel Fix".
Click to select the "Loaded/Unloaded" check box, and 
then click to select the "Load on Startup" check box.
Click OK.
Done
Now the rodent should work ok and scroll up/down in VB6

Notes:
You only need the DLL registered.
The VB project that comes with the download did't work for me.
Also "regsvr32" did'n want to register the DLL from within a subfolder, so I went for C:\ , the right place for it should be in VB itself I think.
go figure....

@danisa

p.s. Thanks for updating the links to Logitech...
I'm done now so won't need it...but some poor soul may!

----------


## baja_yu

The steps danisa posted work fine.

Just to note for Vista/7 users, instead of 




> Click Start, click Run, and type or copy paste from here:
> 
> regsvr32 C:\VB6IDEMouseWheelAddin.dll
> 
> then click OK.


Do this:

- Open Start Menu, type cmd. In the upper left corner you should get 'cmd.exe'
- Right-click on cmd.exe and choose Run as administartor
- In the command prompt that opens execute: regsvr32 C:\VB6IDEMouseWheelAddin.dll

----------


## Elroy

My two-cents on this one.

I've used the VB6ScrollWheelFix for a couple of years now.

It's nice in that it works with a split-code-window (working correctly in whichever split-section has the focus.  It's the only one I've seen that does that correctly.  

It works rather flawlessly for me.

Also Joe gives away the source code, so you can see what it's doing.

Here's the link to download it:
http://www.joebott.com/vb6scrollwheel.htm

----------


## VB-only

I want to comment on this post at a very late date.

As I understand it, the mouse wheel  is involved in three different processes:
 Running under the VB  IDE
 Executing code under VB IDE
 Executing from compiled .exe

 I'm confused as to which of the 3 above does the KB 837910 affect, and how.

 Coding for a compiled executable is very complicated.  Code that I incorporated 15 years ago no longer works the same.

----------


## techgnome

The fix in the context of this thread was scrolling code within the VB6 IDE.

-tg

----------

