+ Reply to Thread
Results 1 to 5 of 5

Issue clearing combobox on change

  1. #1
    Registered User
    Join Date
    04-01-2013
    Location
    Florida, USA
    MS-Off Ver
    Excel 2013
    Posts
    7

    Issue clearing combobox on change

    Currently, my combobox will copy a selection to an active cell and offset to the next cell. My problem is that the selection is not cleared. When i attempted to add combobox = null to the end of the macro, it clears the offset cell that was activated and offsets once more.

    Id like to offset to the next cell, clear the combobox selection and not affect the now activated cell i offset to in doing so.

    This works but does not clear or refocus the combobox
    Please Login or Register  to view this content.
    Any help would be appreciated. Thanks!
    Last edited by TonyFurioso; 04-01-2013 at 03:19 PM.

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Issue clearing combobox on change

    Maybe something like this...

    Please Login or Register  to view this content.

  3. #3
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Issue clearing combobox on change

    Ho Tony,

    Try:
    Please Login or Register  to view this content.
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  4. #4
    Registered User
    Join Date
    04-01-2013
    Location
    Florida, USA
    MS-Off Ver
    Excel 2013
    Posts
    7

    Re: Issue clearing combobox on change

    That worked! Do you have any idea why ComboBox.Value = NULL doesnt work the same way?

  5. #5
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Issue clearing combobox on change

    NULL is not a key word or constant in VBA. You would use "" or vbNullString.

    Also, if you previously used the ComboBox1_Change procedure instead of the ComboBox1_Click procedure, it would trigger twice and clear the next active cell because the combobox would change twice. The second change is when it's cleared.

+ 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