+ Reply to Thread
Results 1 to 3 of 3

Combo Box Lost Focus event not firing

  1. #1
    Registered User
    Join Date
    08-25-2013
    Location
    San Antonio
    MS-Off Ver
    Excel 2007
    Posts
    2

    Combo Box Lost Focus event not firing

    Hello,
    I'm trying to get a little Excel VBA Ap (2007) running by Monday. I want to trap lost focus events in two combo boxes.

    If there's a way to add an event via the user interface, I'm not seeing it.

    I implemented the event handlers by double clicking the combo box from the form designer; it automatically generates the Change event handler; I then manually edit OnChange, changing it to LostFocus, e.g.

    Private Sub cboGroup_Change() becomes cboGroup_LostFocus()

    The event never fires.

    I've tried finding answers online but have failed, and don't have time to order a reference book.

    Could someone tell me what I'm doing wrong?

    Thanks!
    Last edited by W.E. Thompson; 08-25-2013 at 05:34 PM.

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

    Re: Combo Box Lost Focus event not firing

    Comboboxes on a usereform don't have a LostFocus event.

    Have you tried any of the other events?
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    08-25-2013
    Location
    San Antonio
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Combo Box Lost Focus event not firing

    Thanks for answering, Norie!

    I considered OnChange, but that's not really appropriate as it fires as the user edits the combo box's text box. I need to trap when the user either selects an item from the drop down list, or has finished editing by tabbing out of the control. The contents of the second combo box depend on the selection in the first combo box. Do you know the appropriate event or events to use?

    I also tried GotFocus and LostFocus but no luck there, either.

    AH... I just found the user interface to select an event for the combo box, the one on the design view. It's possible I may resolve this after all...
    Last edited by W.E. Thompson; 08-25-2013 at 05:47 PM.

+ 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. [SOLVED] Userform multipage control - exit event not firing or event order
    By jane serky in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-14-2013, 10:23 AM
  2. How to prevent SelectionChange event firing before Change event?
    By franklyn in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-29-2012, 05:17 AM
  3. Listbox_Click event not firing
    By Baapi in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-30-2007, 01:25 PM
  4. Workbook_Open event not firing
    By 0013 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-24-2005, 05:06 PM
  5. [SOLVED] Event sometimes stops firing?
    By HotRod in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 05-04-2005, 08:06 PM

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