+ Reply to Thread
Results 1 to 9 of 9

Combo box - Show dropdown arrow when cell is selected

  1. #1
    Registered User
    Join Date
    12-16-2016
    Location
    Norway
    MS-Off Ver
    2013
    Posts
    13

    Combo box - Show dropdown arrow when cell is selected

    Hello,

    As title is describing, i would like a combo box to show the dropdown arrow as soon as a cell is selected, without going "into the cell".
    Hard to describe that last part, but i don't want it to act as i double clicked the cell.


    Is this possible?


    I use this code:

    Please Login or Register  to view this content.

  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: Combo box - Show dropdown arrow when cell is selected

    Hello gundesvan,

    Hard to tell without seeing a sample Workbook.

    What I do see though is that at the end of your Code you have:

    Please Login or Register  to view this content.
    While it should actually read:

    Please Login or Register  to view this content.
    Regards.
    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
    Registered User
    Join Date
    12-16-2016
    Location
    Norway
    MS-Off Ver
    2013
    Posts
    13

    Re: Combo box - Show dropdown arrow when cell is selected

    Hi,

    I have attached an example that i hope shows how i want it to work.
    Attached Files Attached Files

  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: Combo box - Show dropdown arrow when cell is selected

    Hello gundesvan,

    I notice that you have added the changes to your Code as suggested, and I cannot identify what possible problem you could still have. Everything seems to be working fine now, or am I missing something else which you might not have mentioned?

    Regards.

  5. #5
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,820

    Re: Combo box - Show dropdown arrow when cell is selected

    @Winon: I was hoping you could clarify the issue in your Post #2. I often wonder about this. Could you please explain why it is necessary to include the
    Please Login or Register  to view this content.
    directly under
    Please Login or Register  to view this content.
    even though they already exist below that.
    If you left those two lines out, would they not run in any event after the code hit the errHandler line, meaning that if included, they would run twice?
    You can say "THANK YOU" for help received by clicking the Star symbol at the bottom left of the helper's post.
    Practice makes perfect. I'm very far from perfect so I'm still practising.

  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: Combo box - Show dropdown arrow when cell is selected

    @Mumps,

    Thank you for your interest.

    If no Error occurs when the Code runs,
    Please Login or Register  to view this content.
    remains disabled, and the screen will not update as it should.

    It touches on Code "Stacking".

    Kind Regards.

  7. #7
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,820

    Re: Combo box - Show dropdown arrow when cell is selected

    @Winon: Thank you very much. I was under the impression that if no error occurred, the code would continue to run through the errHandler. I see that this is not the case.

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

    Re: Combo box - Show dropdown arrow when cell is selected

    @Mumps,

    Thank you for the feedback.

    You are welcome, glad I could clarify a bit.

    Kind Regards.

  9. #9
    Forum Expert Kenneth Hobson's Avatar
    Join Date
    02-05-2007
    Location
    Tecumseh, OK
    MS-Off Ver
    Office 365, Win10Home
    Posts
    2,573

    Re: Combo box - Show dropdown arrow when cell is selected

    Regarding post #1, I don't know why you would want that.

    A data validation dropdown is <> combobox dropdown. It is not editing the cell like a doubleclick, it is inside the combobox, not the cell. Have you tried uncommenting the .Activate lines?

    Of course you could use the DropDown property to expand the list as if you clicked the dropdown arrow but I don't think that is what you asked.


    As for post #2, you lost me. I have never found that to be the case. You can easily test that a Label's code executes. That sort of thing "might" be needed if Exit Sub was done too early.

    If you comment out Err.Raise line, 12 is put into Immediate window. Uncommented, 2 is returned as expected.
    Please Login or Register  to view this content.

+ 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] Detect click on dropdown arrow in an activex dropdown box
    By JasperD in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-25-2017, 08:23 AM
  2. Replies: 2
    Last Post: 08-04-2016, 08:23 PM
  3. Replies: 8
    Last Post: 04-30-2015, 12:18 PM
  4. Replies: 2
    Last Post: 03-31-2014, 01:32 AM
  5. [SOLVED] Excel 2010 VBA – Combo Box Options– Clear cell/box in 2nd Combo when 1st Combo selected
    By theshybutterfly in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-17-2013, 07:25 PM
  6. Can't move selected cell with arrow keys
    By madsett in forum Excel General
    Replies: 2
    Last Post: 10-26-2006, 04:30 PM
  7. [SOLVED] Drop-down arrow only visible when cell selected
    By John Richards in forum Excel General
    Replies: 2
    Last Post: 03-04-2005, 08:06 AM

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