James has attended:
Excel VBA Intro Intermediate course
Combo Box help (3 Levels)
I attended a course in November and helped me greatly and for that thank you but was wondering if you could help.
I have data that looks like the following:
ID Name LoS BU Grade Office C/nc
1 bob ADV a 1 1 C
2 harry IFS b 2 2 NC
3 Jim Tax c 3 3 C
This goes on for ~1500 lines.
What I was asked was to run a report using combo boxes.
They want to be able to select a LoS in combo box 1 (only 4 of them)
In combo box 2 they want to be able to choose a BU specific to that LoS (Ranges from like 10-150)
Then from there a third combo box to choose if they want C or NC or both.
Then when they click "ok" it will run a report bringing in the data from the data sheet.
I have managed to create a form that allows them to choose either a BU with all C/NC or choose if its C/NC with all BU.
Hope this makes some sense. If not feel free to email me on hammerfan43@msn.com where I can try to explain it a bit better.
RE: Combo Box help (3 Levels)
Hi James, thanks for your query. What you're trying to do sounds a lot like a filter! My first thought would be to create an Advanced Filter criteria and filter the results out onto a separate worksheet. If however, you need a bespoke form to do this, then create the combos by looping down the relevant columns pulling out the unique values (if you only have 4 potential values in one of the drop downs I'd hard code it). You don't mention what data the report will comprise but I'd hazard a guess that you're looking at either a series of IF...End If test, or Select Case. When the user selects a particular criteria from the dropdowns it simply calls the relevant subroutine, possibly passing variables to it.
I hope that helps. See how you get on and drop me a line on the forum if you need any further assistance.
Anthony