Consulting

Results 1 to 2 of 2

Thread: ComboBox on Userform - Lost/Got Focus

  1. #1
    VBAX Regular
    Joined
    Apr 2017
    Posts
    34
    Location

    Question ComboBox on Userform - Lost/Got Focus

    Hi everyone,

    I have a combobox on a Userform in Word 2010. I managed to find a code to get the mousewheel to scroll in the combobox. I used the events "Enter" and "Exit" with the ComboBox and everything works fine. However, if I keep the userform open and I decide to move the mouse to another application such as a web browser the scroll doesn't work because it is still hooked on the userform and cannot get it unhooked unless I close the userform (which I don't want to).

    Unfortunately there is no LostFocus events for Userforms. Therefore, I'm wondering if a workaround solution is possible to emulate the lost focus scenarios to allow the mousewheel scroll to work if the user is on another application.

    Thank you.

    Massimo
    Last edited by max76; 05-01-2017 at 08:36 AM.

  2. #2
    VBAX Regular
    Joined
    Apr 2017
    Posts
    34
    Location

    Question ComboBox on Userform - Lost/Got Focus

    Hi again,

    for the sake of clarity I have attached the file. Basically if you open the combobox in Word the scrolling works fine. Let's assume a user jumps to another application such as a website without closing the userform on Word. The problem is that the scrolling won't work on the other applicaiton because it remained hooked on the userform. Hence my need to find a way to let the system know that the focus is lost on the Word userform so that the scrolling is automatically unhooked there and becomes available on the new open application.

    Thank you.

    Massimo
    Attached Files Attached Files

Posting Permissions

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