+ Reply to Thread
Results 1 to 7 of 7

ComboBox Search and focus on cell

  1. #1
    Forum Contributor
    Join Date
    02-20-2009
    Location
    Manchester, England
    MS-Off Ver
    Excel 2007
    Posts
    467

    ComboBox Search and focus on cell

    On the attached example, I have a list of football fixtures listed in the range AW4:AW169 and this list is populated in ComboBox1.

    What I want to do is add some code so that when a user selects a fixture from the ComboBox (either by choosing with their mouse or searching by typing) then that corresponding row is selected on the worksheet in column B.

    So, for example, if I was to select Celtic v Rangers (which is in row 166) then once selected focus on the worksheet should move to cell B166.

    Ideally, I don' want to the active cell moving around as I am typing in the combobox if possible. I just think this would be a little irritating. I only want to focus on the value of the ComboBox once selected.

    Cheers,
    Adam.
    Attached Files Attached Files
    Last edited by adam2308; 10-29-2012 at 09:24 AM.

  2. #2
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: ComboBox Search and focus on cell

    Hello adam2308,

    Given your present set-up of the Sheet, please see if the attached Workbook will do for you?
    Attached Files Attached Files
    Please consider:

    Be polite. Thank those who have helped you. Then Click on the star icon in the lower left part of the contributor's post and add Reputation. Cleaning up when you're done. If you are satisfied with the help you have received, then Please do Mark your thread [SOLVED] .

  3. #3
    Forum Contributor
    Join Date
    02-20-2009
    Location
    Manchester, England
    MS-Off Ver
    Excel 2007
    Posts
    467

    Re: ComboBox Search and focus on cell

    Thanks Winon. That works great!

  4. #4
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: ComboBox Search and focus on cell

    Hello adam2308,

    You are welcome.

    Glad I could help!

    Thank you for the nice Rep.

  5. #5
    Valued Forum Contributor
    Join Date
    02-12-2011
    Location
    The Netherlands
    MS-Off Ver
    365
    Posts
    817

    Re: ComboBox Search and focus on cell

    Wouldn't this be easier?

    Please Login or Register  to view this content.
    Kind regards, Harry.

  6. #6
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: ComboBox Search and focus on cell

    @ HSV,

    Hello Harry,

    Yes I agree. I completely forgot about using the ListIndex.

    My complete code now looks like this:

    Please Login or Register  to view this content.
    Looks much nicer, and if an entry in the Combobox is deleted, then the sheet scrolls back to the top.

    Thank you for your input.

  7. #7
    Valued Forum Contributor
    Join Date
    02-12-2011
    Location
    The Netherlands
    MS-Off Ver
    365
    Posts
    817

    Re: ComboBox Search and focus on cell

    My pleasure @Winon.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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