combo box help

Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

Forum home » Delegate support and help forum » Microsoft Excel VBA Training and help » Combo Box help (3 Levels)

Combo Box help (3 Levels)

resolvedResolved · Medium Priority · Version 2007

Edited on Tue 18 Jan 2011, 11:08

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

Tue 25 Jan 2011: Automatically marked as resolved.

 

Training courses

 

Training information:

Welcome. Please choose your application (eg. Excel) and then post your question.

Our Microsoft Qualified trainers will then respond within 24 hours (working days).

Frequently Asked Questions
What does 'Resolved' mean?

Any suggestions, questions or comments? Please post in the Improve the forum thread.


 

Excel tip:

Do a fast scroll

In big Excel databases with many records, you can move down thousands of rows super-fast as follows: hold down Shift then click on the scrollbar somewhere below the scrollbar handle. This will move you way down the sheet without your having to use the scrollbar up/down arrows or drag on the scrollbar handle.

View all Excel hints and tips


Server loaded in 0.08 secs.