KimberlyHeart
New Member
- Joined
- Mar 17, 2016
- Messages
- 19
I have a spreadsheet with 1000+ rows of data, that I want to filter down based on two separate columns of values. I know I can do this using the AutoFilter option, but I am trying to do this using an Excel VBA script which prompts the user for the values it wants to filter on. So, I have a way for identifying the unique values available in each column I want to filter on:
Code:
This works... and I get the message box with the values I want. So, my array "Makes" is holding the values I need. I also have created a UserForm with a ListBox where I want to display these unique values and let the user multi-select which values they want to filter on. How do I get the values from my previously created array to display in this UserForm/ListBox? I was trying this as the initial code inside the UserForm1:
Code:
But, for some reason, when I try to execute this code, via:
Code:
which is the line immediately after the MsgBox line above, I get "ERROR 13 TYPE MISMATCH" with that UserForm1.Show line highlighted. WHAT IS WRONG THERE? Once the selections are made, how do I capture only those selected values and then apply the filter to my spreadsheet? Part of my code here is:
Code:
But, that is with the hardcoded values. How do I get the user selected values from the Makes array to be used in this filter? |
<tbody>
</tbody>