+ Reply to Thread
Page 3 of 3 FirstFirst 1 2 3
Results 21 to 24 of 24

Thread: Disabling Mouse Scroll

  1. #21
    Barn Newbie CONRADOROCHAC is an unknown quantity at this point CONRADOROCHAC's Avatar
    Join Date
    Oct 2008
    Posts
    1
    Rep Power
    4

    HELLO AOG123:

    Thank you for replying to my call fro help on the "Disabling the Mouse Wheel when used in MS Access. I Downloaded you sample and realized my mistake. Basically, the problem was that I Created the "CMouseWheel" as a Module rather than as a Class Module as per your sample. It has worked as needed. Thank you again for your help

    CRC

  2. #22
    Barn Newbie wapfu is an unknown quantity at this point wapfu's Avatar
    Join Date
    Dec 2009
    Posts
    2
    Rep Power
    3

    Hi,
    New to all of this which is not unusual I expect.

    Well now, This handy code may well have saved the day,

    I have copied the modules.

    My Question lies in the events and an error message,


    Forms Events which are

    Load,
    Close and
    MouseWheel_MouseWheel

    The event = MouseWheel_MouseWheel = where is it?
    I created one

    Private Sub Form_MouseWheel(ByVal Page As Boolean, ByVal Count As Long)
    'This is the event procedure where you can
    'decide what to do when the user rolls the mouse.
    'If setting Cancel = True, we disable the mouse wheel
    'in this form.

    MsgBox "You cannot use the mouse wheel to scroll through records."
    Cancel = True
    End Sub

    and I get on debug Variable not defined

    for "clsMouseWheel.subClassUnhookForm"
    In
    Private Sub Form_Close()
    'Unhook the form by calling the
    'SubClassUnhook form method in the
    'class, and then destroy the object
    'variable

    clsMouseWheel.SubClassUnHookForm
    Set clsMouseWheel.Form = Nothing
    Set clsMouseWheel = Nothing
    End Sub

    Acces 2003

    Best Regards
    Bill

  3. #23
    Barn Newbie wapfu is an unknown quantity at this point wapfu's Avatar
    Join Date
    Dec 2009
    Posts
    2
    Rep Power
    3

    Oppppppppppppppppps - My Bad,
    Forgot to declare this at the top of the form
    'Declare a module level variable as the custom class
    'and give us access to the class's events
    Private WithEvents clsMouseWheel As CMouseWheel


    All good - yahoooooooooooooooooooooooo

    Kind Regards
    Bill

  4. #24
    Barn Newbie peabs is an unknown quantity at this point peabs's Avatar
    Join Date
    Jun 2010
    Posts
    1
    Rep Power
    2

    Shutting off the mouse scroll

    Thanks worked great!

    One thing I noticed is that form crashes once you have had the visual basic editor open. But as long as you just stay in the form and tables... its all good.

+ Reply to Thread
Page 3 of 3 FirstFirst 1 2 3

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

SEO by vBSEO