+ Reply to Thread
Results 1 to 12 of 12

To use the mouse wheel in a VBA Userform to navigate in my Texbox

  1. #1
    Registered User
    Join Date
    08-23-2012
    Location
    France
    MS-Off Ver
    2007
    Posts
    12

    To use the mouse wheel in a VBA Userform to navigate in my Texbox

    Hello,

    For my VBA application with Userforms (several Texbox) in Excel 2007 on Win7, my goal would be to use My mouse wheel to navigate in my Texboxes

    I have followed the "Add support for the scroll wheel to the Microsoft Visual Basic for Applications 6 environment"
    • regsvr32 VB6IDEMouseWheelAddin.dll
    • Enable the VBA add-in In Excel VBA Add-In Manager dialog, to click MouseWheel Fix.


    Unfortunately, this has no effect
    My Text in the Userfom Textbox, can only be navigated thanks to the scrollbar, no effect with the mouse Wheel

    Please could you help me to fix this issue ?

    Many Thanks in advance for your help

    Regards

    Christian

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: To use the mouse wheel in a VBA Userform to navigate in my Texbox

    Hello CKL67,

    There are few possible reasons why it isn't working.
    1. To register the dll, you must be logged on as Admin or have Admin rights.
    2. The path needs to be enclosed in double quotes because there are spaces in the path.
      Please Login or Register  to view this content.
    3. Your Registry Key update is in the HKEY_LOCAL_MACHINE hive instead of HKEY_CURRENT_USER.
    4. If you have 64 bit Windows don't put 32-bit DLLs into System32. Put them in the SysWOW64 folder.

    You may want to try this alternative product to control the scroll feature. It works with all versions of Windows. You can download it from the link below.
    Last edited by Leith Ross; 11-11-2013 at 08:11 PM. Reason: Added Link
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Registered User
    Join Date
    08-23-2012
    Location
    France
    MS-Off Ver
    2007
    Posts
    12

    Re: To use the mouse wheel in a VBA Userform to navigate in my Texbox

    Hello Leith

    Tanks for your answer, unfortunately it is still not working

    With Win7 64bits I have

    (1) Registered the dll, as Admin
    Copied VB6IDEMouseWheelAddin.dll files to C:\Windows\SysWOW64
    With cmd as admin
    Please Login or Register  to view this content.
    I got the confirmation that operation was successful
    (2)Registered "VBA Mouse Wheel Fix.reg"
    I have also checked that the Registry Key was in HKEY_CURRENT_USER.
    CaptureReg.JPG
    (3) Enable the MouseWheel in VBA add-inBut still not working ... :-(
    What could explain that it is not working ?

    Many thanks in advance

    Regards

    Christian
    Last edited by CKL67; 11-12-2013 at 05:13 AM.

  4. #4
    Registered User
    Join Date
    08-23-2012
    Location
    France
    MS-Off Ver
    2007
    Posts
    12

    Re: To use the mouse wheel in a VBA Userform to navigate in my Texbox

    Hello All,

    Could anybody get in touch with me regarding the issue that I'm facing with mousewheel and VBA

    I'm stuck in that situation

    Many thanks in advance

    Regards

    Christian

  5. #5
    Registered User
    Join Date
    08-23-2012
    Location
    France
    MS-Off Ver
    2007
    Posts
    12

    Re: To use the mouse wheel in a VBA Userform to navigate in my Texbox

    Hello All,

    I have the feeling that I'm alone in that world ...
    Joke aside

    It seems that nobody have the answer to my issue.
    Quest: Does anybody succeeded to use the mouse wheel in a user form by following the process above in Win 7 ?

    Many thanks for your help

    Regards

    Christian

  6. #6
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: To use the mouse wheel in a VBA Userform to navigate in my Texbox

    That process does not relate to your question - it is for the ability to scroll in the VB Editor not in a userform. For a userform you must use API methods to hook the messages for the window.

  7. #7
    Registered User
    Join Date
    08-23-2012
    Location
    France
    MS-Off Ver
    2007
    Posts
    12

    Re: To use the mouse wheel in a VBA Userform to navigate in my Texbox

    Thanks for your answer ;-)
    However, I had the feeling that the mouse wheel worked well in my VB Excel editor even without to modify the registry ..
    (Done for nothing then ??)

    Also as you can see, My quest was clear in my post:
    “For my VBA application with Userforms (several Texbox) in Excel 2007 on Win7, my goal would be to use My mouse wheel to navigate in my Texboxes”
    So you can understand that I'm little bit surprised about that answer

    OK, let us go forward
    Could you please advise, or share a link how to process to active API methods to hook the messages for the window ?

    Many thanks in advance

    Christian
    Last edited by CKL67; 12-10-2013 at 06:21 AM.

  8. #8
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: To use the mouse wheel in a VBA Userform to navigate in my Texbox

    I do not understand why you are surprised by the answer. Your intention was clear but the process in the article was not related to it therefore I stated the same.

    You may adapt the code similar to this: http://social.msdn.microsoft.com/For...0?forum=isvvba

  9. #9
    Registered User
    Join Date
    08-23-2012
    Location
    France
    MS-Off Ver
    2007
    Posts
    12

    Re: To use the mouse wheel in a VBA Userform to navigate in my Texbox

    Thanks,

    Now it is clear for me !
    I will try to follow the example which have been provided in your adviced link
    It seems is not so easy.

    Merci

    Christian

  10. #10
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: To use the mouse wheel in a VBA Userform to navigate in my Texbox

    Quote Originally Posted by CKL67 View Post
    It seems is not so easy.
    Unfortunately userforms have not much been improved since they were created and must be helped a lot by the developer.

  11. #11
    Registered User
    Join Date
    08-23-2012
    Location
    France
    MS-Off Ver
    2007
    Posts
    12

    Re: To use the mouse wheel in a VBA Userform to navigate in my Texbox

    Hello

    After some searches, I finally found a simple example that I adapted to my code:
    The link to the example is
    http://codes-sources.commentcamarche...el-et-userform

    (In french but easy to understand)

    To adapt the example to a textbox replace in procedure LowLevelMouseProc
    .TopIndex = .TopIndex - 3
    by
    .CurLine = .CurLine - 3


    Christian

  12. #12
    Registered User
    Join Date
    08-23-2012
    Location
    UK
    MS-Off Ver
    Excel 2010
    Posts
    2

    Thumbs up Re: To use the mouse wheel in a VBA Userform to navigate in my Texbox

    An old post but thanks for answering your own question CKL67. I used the French example you found to add scrolling to my textbox and it worked.

    Windows 7 64-bit Excel 2010

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Scroll with mouse wheel on userform
    By Josh_123456 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-08-2007, 08:19 PM
  2. [SOLVED] mouse wheel
    By Gary''s Student in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-02-2006, 02:20 PM
  3. Navigate Excel with mouse wheel.
    By Gene in forum Excel General
    Replies: 4
    Last Post: 03-16-2006, 08:45 PM
  4. fly wheel on a mouse and a userform
    By MD in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-14-2005, 05:06 PM
  5. Mouse Wheel & Mouse Drivers
    By Otto Moehrbach in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-07-2005, 05:06 PM

Tags for this Thread

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1