+ Reply to Thread
Results 1 to 7 of 7

Clear selection when another choice made in dropdown list.

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    06-14-2013
    Location
    jk
    MS-Off Ver
    Excel 2007
    Posts
    326

    Clear selection when another choice made in dropdown list.

    Hi all,

    I'm not really able to upload my form due company privacy and clearing the form would take a long time.
    So i will try and explain my question:

    In cell B11 there is a dropdown-list which let a user choose an item.
    In cell B17 there is a dropdown-list which let a user choose a dealer for this item.

    Item has it's own dealer, via a formula i determine the dealers per item with data validation.
    However when an item and a dealer has been chosen, and someone changes the item, the dropdownlist in B17 will be updated but the previously chosen dealer will be stayed displayed.

    Is there an easy way to script when the value of B11 has been changed, the value of B17 should be overwritten with: Select dealer


    Thanks for all your help!!

    Regards,
    Crispy

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    26,760

    Re: Clear selection when another choice made in dropdown list.

    Put this code into the Worksheet module for the worksheet containing this data. This worked in my test but caveat emptor since I don't have your file.

    Private Sub Worksheet_Change(ByVal Target As Range)
    
       If Not Intersect(Target, Range("B11")) Is Nothing Then
          Range("B17").Value = "Select dealer"
       End If
    
    End Sub
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Forum Expert gmr4evr1's Avatar
    Join Date
    11-24-2014
    Location
    Texas
    MS-Off Ver
    Office 2010 and 2007
    Posts
    3,448

    Re: Clear selection when another choice made in dropdown list.

    Maybe...
    Private Sub Worksheet_Change(ByVal Target As Range)
    If Target.Address = "$B$11" Then
    [B17] = "Select Dealer"
    End If
    End Sub
    1N73LL1G3NC3 15 7H3 4B1L17Y 70 4D4P7 70 CH4NG3 - 573PH3N H4WK1NG
    You don't have to add Rep if I have helped you out (but it would be nice), but please mark the thread as SOLVED if your issue is resolved.

    Tom

  4. #4
    Forum Contributor
    Join Date
    06-14-2013
    Location
    jk
    MS-Off Ver
    Excel 2007
    Posts
    326

    Re: Clear selection when another choice made in dropdown list.

    I just put it in the initial Macro.
    Thanks all!

  5. #5
    Forum Contributor
    Join Date
    06-14-2013
    Location
    jk
    MS-Off Ver
    Excel 2007
    Posts
    326

    Re: Clear selection when another choice made in dropdown list.

    Hi both,

    Thanks for your reactions.
    These both aren't working, could this because i allready have a Private Sub Worksheet_Change set in my sheet?
    Naming it to Worksheet_Change 2 doesn't work i guess lol.

  6. #6
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    26,760

    Re: Clear selection when another choice made in dropdown list.

    Quote Originally Posted by Crispy85 View Post
    [...]could this because i allready have a Private Sub Worksheet_Change set in my sheet?
    Yes. Post your code and I'll show you how to modify it.

  7. #7
    Forum Expert gmr4evr1's Avatar
    Join Date
    11-24-2014
    Location
    Texas
    MS-Off Ver
    Office 2010 and 2007
    Posts
    3,448

    Re: Clear selection when another choice made in dropdown list.

    You're welcome.

+ 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. Make same selection for multiple drop down list and clear all for all dropdown list
    By salomip13 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-30-2014, 01:34 PM
  2. [SOLVED] Automatic date, but after a dropdown selection is made, not before
    By FlyFisherman in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 10-18-2013, 08:43 PM
  3. [SOLVED] How to make a dropdown list cell default to blank, after another cell selection is made
    By chardsmith in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-30-2013, 03:46 AM
  4. [SOLVED] Autofill data once a selection is made from a dropdown box.
    By ggummo in forum Excel General
    Replies: 3
    Last Post: 03-13-2013, 11:55 AM
  5. [SOLVED] Want to populate a group of cells when a particular selection is made from a dropdown list
    By ChezHenri in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-30-2012, 01:08 PM
  6. Replies: 2
    Last Post: 09-21-2011, 09:21 AM
  7. drop-down list changing according to choice made
    By choc_penguin in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-04-2006, 05:50 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