+ Reply to Thread
Results 1 to 6 of 6

modify macro with multiple criterias from comboboxes help

  1. #1
    Forum Contributor
    Join Date
    06-05-2013
    Location
    Austria
    MS-Off Ver
    Excel 2016
    Posts
    169

    modify macro with multiple criterias from comboboxes help

    Hy everyone,
    In my userform i have 5 comboboxes. If there is a value in the comboboxe, then a macro should filter with these criterias. I have a macro that works with combobox 1:

    Please Login or Register  to view this content.
    My ideas was, that a macro should look in every combobox and if there is a value in one or more comboboxes, then the value(s) should be the criteria(s). But using if-statements would make the code very long. My comboboxes are:
    cmb_Anlagegut Field:=2
    cmb_Information Field:=3
    cmb_Material Field:=4
    cmd_Order Field:=5
    cmb_Sold Filed:=6

    I searched a lot for a macro that I can use, but I had no luck. So can you help me please?

    THANKS a lot
    Kind Regards

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

    Re: modify macro with multiple criterias from comboboxes help

    This is not tested.


    Please Login or Register  to view this content.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Forum Contributor
    Join Date
    06-05-2013
    Location
    Austria
    MS-Off Ver
    Excel 2016
    Posts
    169

    Re: modify macro with multiple criterias from comboboxes help

    Hy, thanks a lot for the macro. I will test it.

    Kind regards

  4. #4
    Forum Contributor
    Join Date
    06-05-2013
    Location
    Austria
    MS-Off Ver
    Excel 2016
    Posts
    169

    Re: modify macro with multiple criterias from comboboxes help

    Hy AlphaFrog
    your code works perfect. Thanks a lot. Can you help me again please? I have a textbox now and if there is a value in this textbox then it should filter all columns and rows if there can this value be found. I tried this code, but I do not get a result:

    Please Login or Register  to view this content.
    Thanks again
    Kind Regards

  5. #5
    Forum Contributor
    Join Date
    06-05-2013
    Location
    Austria
    MS-Off Ver
    Excel 2016
    Posts
    169

    Re: modify macro with multiple criterias from comboboxes help

    Hy AlphaFrog
    your code works perfect. Thanks a lot. Can you help me again please? I have a textbox now and if there is a value in this textbox then it should filter all columns and rows if there can this value be found. I tried this code, but I do not get a result:

    Please Login or Register  to view this content.
    Thanks again
    Kind Regards

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

    Re: modify macro with multiple criterias from comboboxes help

    Please Login or Register  to view this content.
    You call another procedure called Clear. That is also a command keyword. It's better practice to name procedures something unique e.g.; ClearMe
    Last edited by AlphaFrog; 11-17-2017 at 09:18 PM.

+ 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] Macro Find set criterias to a colomn of number, delete the rows that don't meet criterias
    By TAMMY32 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 05-03-2017, 04:09 PM
  2. Macro or Formula for multiple match criterias and return yes or no
    By Renejorgensen in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-28-2016, 03:44 AM
  3. Four rule statement with multiple criterias (Formula?, macro?, IDK??)
    By bwalling6 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-10-2013, 04:49 PM
  4. [SOLVED] need to loop through multiple activex comboboxes and modify properties
    By Bugsgas1 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-08-2012, 10:06 PM
  5. Replies: 8
    Last Post: 06-07-2012, 05:14 PM
  6. [SOLVED] Modify macro to process multiple data
    By sans in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 05-22-2012, 04:36 AM
  7. [SOLVED] Change cell color base on criterias from multible comboboxes !
    By Petter120 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-05-2012, 05:34 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