disable scroll wheel

deanrd

New Member
Joined
Sep 23, 2006
Messages
14
Is there any way to disable the mouse scroll wheel?

I use the scrollarea, but the 1st cell of the scrollarea stays outlined. I tried a custom view, but that disables the scrollarea.

I could use a form instead, but someone else I know is having the same problem and I really didn't want to have to do that.

Thanx - Dean.
 
Hello, Dean,

Everybody can have a bad day :) I was thinking about you before putting on my machine and hoping you wouldn't miss the great resources of this Board due to some argueing. Apologise freely accepted.

this is a "tryout"reply
I've spent some time experimenting (again): the ideas might need some tweaking, but I hope this will be a resource of inspiration.

Some API-calls could possibly disable the scrollwheel, but that's not my best side. I can ask some guys ... But before "messing" whit the users settings - I would prefer a little more code or a "workaround" rather then using such techniques which can cause trouble (what if the programm crashes and the wheel is still disabled ?) I never needed to do that, although needed the same functionality...

Keep in mind that some users, whatever "protection" you put in your workbook, will find a way (maliciously or by accident) to circumvent it.

Assuming you need only shapes on your startsheet (no text in cells), try this:
1. make cell A1 as large as an entire screen (columnwidth max = 255, rowheight max = 409)
2. hide all other rows and columns
3. hide scrollbars and row&columnheaders
4. create your autoshapes + assign macros
5. protect your sheet, while disabling "allow to select unlocked cells" as well as "locked cells" (if you have an Excelversion with those settings)
6. check zoomfactor

you could put some of these steps in a macro "resetSettings" to restore your settings at some given points (choose from list or invent some others :) )
- when opening the workbook
- whenever a macro is run
- each minute

example of this macro
Code:
Sub showonlyA1()

Application.ScreenUpdating = False
ActiveSheet.Unprotect

    With Range("A1")
    .RowHeight = 409
    .ColumnWidth = 255
    Range("B1:B" & Columns.Count).EntireColumn.Hidden = True
    Rows("2:" & Rows.Count).EntireRow.Hidden = True
    End With
    
    With ActiveWindow
        .DisplayHeadings = False
        .DisplayHorizontalScrollBar = False
        .DisplayVerticalScrollBar = False
        .DisplayWorkbookTabs = False
        .ScrollColumn = 1
        .ScrollRow = 1
        .Zoom = 100
    End With
    
    With ActiveSheet
    .Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
    .EnableSelection = xlNoSelection
    End With

Application.ScreenUpdating = False

End Sub

best regards,
Erik

EDIT: thinking about this statement
I would like to find a way to disable the mouse scrollwheel.
isn't the real question:
I would like to find a way to disable the user from changing the view (or scrolling) ?
 
Upvote 0

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.

Forum statistics

Threads
1,215,497
Messages
6,125,157
Members
449,208
Latest member
emmac

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top