I am trying to write a VBA macro to AutoFilter a table using the users input. I need the user to indicate the columns to filter and also the Criteria for that field. Therefore I thought to define a Sub with multiple optional arguments(parameters) to take users preference. My problem is how to check if an optional argument is supplied?
I understand that I can write a test for each parameter and then write a conditional statement for each possible option. But that doesn't seem a smart way and am wondering if any one can suggest a solution. I should say that in the beginning we don't know what's the number of argument we expect to receive from the user.
Thanks for your responses.