PDA

View Full Version : Solved: How to make the mouse Scroll locked



gopi09_m
05-19-2008, 06:43 AM
Hi,

How to disable the mouse Scroll for a particular worksheet in a workbook?

Regards,
Krrishna

Oorang
05-25-2008, 12:34 PM
The short answer is not "no not really".
As far as I know, there Mousewheel Events are not exposed to Excel VBA. There are a few so-so workarounds, but they aren't great. You can set Excel.Application.RollZoom to False using the worksheet activate event (and restore it on deactivate). But while preventing scrolling, that method will allow the mousewheel to change the zoom. (Likely even less desirable.) And you can also turn off the vertical and horizonal scroll bars at the workbook level, but that also will not disable mousewheel events.

If you are trying to keep users from scrolling into data you don't want visible it's usually better to put it in another worksheet which you can either set to hidden or veryhidden.

gopi09_m
05-26-2008, 09:52 AM
thank you.