Announcement

Collapse
No announcement yet.

Code to capture mouse wheel rotation.

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Code to capture mouse wheel rotation.




    Hi everyone,

    I visited this web site many times; this is my first question.

    I need to capture mouse wheel rotation steps in order to update a row counter in a cell of a sheet. I have Excel 2016 and Windows 10.
    I don't need to take complete control of the mouse (unless I have to), just read a parameter which tells me if the wheel has been moved up or down.
    I have Excel 2016 and Windows 10.
    Is it possible to do what I need? Does anyone have the VBA code to achieve it? (and a quick explanation of it, thanx)

    Please ask me questions if you need to; English is not my mother language.

    Thank you for your time!


  • #2
    Hello, can you explain why you would need something like this?
    Dave
    XLorate

    Comment


    • #3

      Hi Dave,
      I'd like to be able to update a cell of a sheet where I have a row counter.
      By using Application.OnKey I already update that cell when the user presses PgUp/Dn and the Up/Down arrows by subtracting/adding 33 (it is the number of rows I show in a page) or 1 for the arrows. I'd like to do the same with the mouse wheel by adding or subtracting 3 (better yet the number in Settings/Mouse).
      I've seen some code which lets the user scroll in a form but, because I'm a beginner, I understand little of that code therefore I can't change it.
      Thank you Dave!

      Guido

      Comment


      • #4


        Problem solved. Thank you!

        Comment

        Working...
        X