combo box help
The UK's Number 1 for Microsoft Office Training Add this page to your favourites/bookmarksBookmark page
 
View printable version of pagePrintable version
Plus One Google
Customer: Sign in
Delegate: Sign in
Trainer: Log in

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

replyReply Tue 18 Jan 2011, 11:06 Edited on Tue 18 Jan 2011, 11:08Delegate James said...

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.

For upcoming training course dates see: Pricing & availability

replyReply Wed 19 Jan 2011, 09:51Trainer Anthony said...

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.

 

Please browse our web site to find out more about
excel classes and other Microsoft training courses.

Excel tip:

Line breaks in a cell

You can control the line breaks for multiple-line headings or labels in your Microsoft Excel worksheet, just like you do in Microsoft Word. Here's how to do it.

Click the cell where you want the label or heading to appear.
Type the first line of information.
Press ALT+ENTER.

View all Excel hints and tips


Microsoft Certified Partner Accredited Training Provider: Institute of IT Training Institute of Leadership and Management - Certified Courses Security Seal verified by visa, mastercard securecard