+ Reply to Thread
Results 1 to 11 of 11

Peter Thorntons ComboBox mouse wheel scroll

  1. #1
    Forum Contributor
    Join Date
    09-17-2014
    Location
    UK
    MS-Off Ver
    2007
    Posts
    117

    Peter Thorntons ComboBox mouse wheel scroll

    For anyone not familiar with this, it allows you to use the mouse scroll wheel in a userform and the full code can be viewed here

    I know it works in a userform, however I'm trying to use it for an ActiveX ComboBox.

    I've set it to trigger as:
    Please Login or Register  to view this content.
    However I'm getting a
    Run-time error '438':
    Object doesn't support this property or method


    Does it simply not work outside a userform or is it something I've done wrong with the syntax here:

    Please Login or Register  to view this content.
    as needs to be the format of
    HookListBoxScroll(frm As Object, Ctl As MSforms.control)

    I'll never take the scroll wheel for granted again!

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,645

    Re: Peter Thorntons ComboBox mouse wheel scroll

    Hard to tell what the problem is without seeing the code for HookListBoxScroll and any other associated code.
    If posting code please use code tags, see here.

  3. #3
    Forum Contributor
    Join Date
    09-17-2014
    Location
    UK
    MS-Off Ver
    2007
    Posts
    117

    Re: Peter Thorntons ComboBox mouse wheel scroll

    Link to full code is in initial post (the word here).

    I'll put the link as the full URL below:

    https://social.msdn.microsoft.com/Fo...0?forum=isvvba

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,645

    Re: Peter Thorntons ComboBox mouse wheel scroll

    There's a lot of code on the page that link leads to and it's not clear which to use.

    Could you upload a sample workbook with the code you are using?

  5. #5
    Forum Contributor
    Join Date
    09-17-2014
    Location
    UK
    MS-Off Ver
    2007
    Posts
    117

    Re: Peter Thorntons ComboBox mouse wheel scroll

    The workbook is huge and contains lots of sensitive information but I'll create an example workbook to illustrate what I'm doing.

    In the meantime, the code I'm using is:

    Please Login or Register  to view this content.

  6. #6
    Forum Contributor
    Join Date
    09-17-2014
    Location
    UK
    MS-Off Ver
    2007
    Posts
    117

    Re: Peter Thorntons ComboBox mouse wheel scroll

    All I wish to do is be able to use the mouse wheel to scroll through the combobox list - instead of the worksheet.


    Here's the example:
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    04-08-2016
    Location
    Melbourne,Australia
    MS-Off Ver
    Microsoft Office Excel 2007
    Posts
    3

    Re: Peter Thorntons ComboBox mouse wheel scroll

    Hi BuZZarD73,

    Have you, or perhaps someone else here, manged to apply this code to a dropdown validation list, without using the userforms?

    From the example's I've reviewed, and taking a hint from the blog title from which this code orginated, "Mouse scroll in UserForm ListBox in Excel 2010".
    I suspect the source code is hardwired for just "User forms"

    But if someone else has found a way around this then please share I'll also check other potential sources and provide feed back.

    Being an old thread, and my first post, we'll see how we go.

  8. #8
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    22,015

    Re: Peter Thorntons ComboBox mouse wheel scroll

    It won't work with a data validation dropdown because that's not a windowed control, as far as I know.

  9. #9
    Registered User
    Join Date
    04-08-2016
    Location
    Melbourne,Australia
    MS-Off Ver
    Microsoft Office Excel 2007
    Posts
    3

    Re: Peter Thorntons ComboBox mouse wheel scroll

    It is my understanding that both Active X ListBox and ComboBox commands are able to be interfaced with Peter'a code, but I am having this confirmed!

    There's also code availble,provided by Jaafar Tribak and posted in a forum titled "Re: How to get handle to a control on a spreadsheet? ", which does allow a mouse scroll interface with ActiveX listBoxs controls.
    This code does appear to be based on Peters, but as I havn't been unable to make contatc with Jaafar to discuss His code, I a still waiting for clarification on combobox mouse scrolling.

    However, I am doing my best to push forward some clarification son Peter's code and to hopefully post back some working examples

  10. #10
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    22,015

    Re: Peter Thorntons ComboBox mouse wheel scroll

    Yes it will work with Activex controls on a sheet, but you asked about validation drop down which aren't Activex.

  11. #11
    Registered User
    Join Date
    04-08-2016
    Location
    Melbourne,Australia
    MS-Off Ver
    Microsoft Office Excel 2007
    Posts
    3

    Re: Peter Thorntons ComboBox mouse wheel scroll

    Yes, My Bad

+ 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. Getting the MOUSE SCROLL WHEEL to work with ActiveX COMBOBOX
    By nenadmail in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-16-2012, 07:26 AM
  2. Scroll horizontally with a mouse wheel
    By luv2glyd in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-12-2010, 11:16 AM
  3. Wheel on mouse doesn't scroll in VB
    By Nolan in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-12-2006, 08:35 AM
  4. [SOLVED] scroll with wheel mouse
    By Scott in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-11-2005, 04:05 PM
  5. scroll listbox with mouse wheel
    By RB Smissaert in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-26-2005, 05:55 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