+ Reply to Thread
Results 1 to 4 of 4

How to clear two comboboxes that depend on each other values.

  1. #1
    Registered User
    Join Date
    08-31-2013
    Location
    Poland
    MS-Off Ver
    Excel 2010
    Posts
    15

    How to clear two comboboxes that depend on each other values.

    Hi!

    Just like in the topic:
    I have a problem with macro that clears the values of two comboboxes.
    Unfortunately there is always an error which says that "The value was nat found"
    Let me explain why:
    When I choose a value in combobox1 the value of combobox2 depends on the value of the first one(I use combobox_change subs). The same is with the second combobox.
    When I clear combobox1 an error occurs that in the combobox2 there was no matching data. The code breaks and doesn't allow me to clear the second one.
    VBA doesn't allow to clear both comboboxes at once.

    Can I ask you for help?

  2. #2
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    Newcastle, Australia
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    1,429

    Re: How to clear two comboboxes that depend on each other values.

    Hi,

    Inside the ComboBox1_Change() subroutine, try adding this before any of your existing code:
    Please Login or Register  to view this content.
    Hope this helps

  3. #3
    Registered User
    Join Date
    08-31-2013
    Location
    Poland
    MS-Off Ver
    Excel 2010
    Posts
    15

    Re: How to clear two comboboxes that depend on each other values.

    Call me an Idiot.

    Thank you so much!

  4. #4
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    Newcastle, Australia
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    1,429

    Re: How to clear two comboboxes that depend on each other values.

    Hahaha no worries!

    Please don't forget to mark this thread as solved and please click on the * next to my post to say thanks

+ 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. Fill multiple comboboxes with same values
    By aman1234 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-13-2017, 01:55 AM
  2. Vba cmd1 create workbook cmd2 create worksheet depend upon combobox values
    By breadwinner in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-17-2013, 03:20 AM
  3. automatic group rows depend on cell values
    By yellowpower in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-15-2010, 09:46 AM
  4. Concantenating values selected from comboboxes
    By chris_norton in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-23-2009, 09:10 AM
  5. Clear Comboboxes & Textboxes
    By MBlake in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 05-02-2005, 06: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