Free Microsoft Excel 2013 Quick Reference

cascading combo boxes...???

is there any way in which I can get the selection from one combo box to influence the second?? In other words, The second combo box is dependant on the first.
I am using Excel XP.

any help would be appreciated.

I have researched the forum for threads that help but nothing quite gets me to where I need for a series of cascading combo boxes on my user form.

I want to select a project from a dynamic list of projects that are listed in SheetA. Projects are listed over two columns being Location and ProjectName which I want both to be in the combo box.

Selecting a project then populates a second combo box with all the Contracts that make up that project. These are listed in another sheet "Contracts". They are all jumbled together with all contracts for all projects so the second combo box needs to search through the second column of Contracts (ProjectID) to collect all contracts with the correct ProjectID and then present these for selection in the second combo box, with three relevant fields being ContractName, ContractID and ContractAmount.

The output of the selection is then used to retireve all the details of that particular contract - I have this functionality already in the user form and just need the second combo box to deliver a ContractID to a range which will then trigger the user form to collect the contract date.

I am sure this can be done and hope someone can help me!

thanks in advance,

I have been trying to get through a large number of transactions which need categorising. Have been using dependent validation lists and its pretty slow as I have to scroll down or up each list looking for the category I want. Is there a way of "turning on" something similar to the combo boxes "MatchEntry" (i think thats the one) property for the drop down list used in Data Validation? Otherwise, i need to try cascading combo boxes within the worksheet. I just had a run through and couldn't get the ListFillRange property to accept anything????

Hey, I am trying to make a Cascading Combo Box Indirect Population using the ActieX combo box. I am trying to have the first box select a location and when that is selected only the names from that location appear in the second combo box. Once the choice has been made , I then need the persons name to show in the cell "E3".

I have attached a sample file of what I am looking for with the necessary ranges.


I am having a very bad day where nothing seems to be working for me.

In a worksheet i can create cascading combobox's no problem, the problem is trying to do it in a Form.

The first combo box, in row source to look at a list, simple.

The second combo box i want to look at a list based on the entry of the first, so for example the 1st box looks at a list of manufacturers, Ford, Vauxhall etc, the second list looks at the type, corsa, tigra etc, so the second list is called Vauxhall (if that was selected, or list three called ford and so on)

Normally this would be =indirect($first cell ref)

I cant use Indirect formula in a form, so where do i put this code?

Does anyone have a tutorial for this kind of thing?

Thanks Guys


Good day,

I have a user form setup with two combo boxes. When the user selects a value from the 1st box, I want to restrict the values in the 2nd box. I am currently putting all values in the boxes with .additem , can someone give me a snippet of code on how to do this?


Good day,

On my user form I have 3 cascasding combo's, and I want to put a value in a textbox based on the values in the three box's. For example if the user selects Ford Motor Company of Canada, and I have a two character code referenceing that selection, for example Company1. And let's say General Motors of Canada would be Company2. Keeping with Ford, in the second box the user would select Vehicle, if Mustang was selected the code would be Type1, and in the third combo box it would be model in this case let's call it Model1. So in the textbox I would want to see


I have attached the user form to help clarify the problem, any help would be great.

Thanks alot

I am sure that this topic has arisen befor, and i have carried out a search, without really finding what i am after.

I have a form on my spreadsheet that adds data, i am trying to link to Comboboxes together,

My combo boxes are setup as follows.



so that if i select:

Manufacturer - Ford

in the combo box cboEdition i only get those cars associated with Ford, ie, KA....Fiesta..Galaxy

please help


I have a VBA UserForm with 4 Combo boxes . These are dynamically populated by reading unique values from its corresponding column on a sheet and placing them in another sheet which the combo box reads.

The problem is that the user wants the following they select a value from ComboBox1. The remaining 3 combo boxes in effect requery to display choices only based on associations with the selection of ComboBox1.

The user then may select something from one of the other 3 Combo Boxes and would like the process to repeat itself and the remaining 2 in effect requery to choices associated with the first 2 selections.

I am trying to simply mimic what excel can do in the Auto filters but provide an interface that looks pretty.

I have done this many times in Access but was wondering how to approach this on a VBAS User Form in Excel. Thanks

I am interested in hiring someone who can modify an invoice excel file to create a 2 Sets of Cascading Combo Boxes - Bill to will Drive the Ship to field.
Item Selection within the invoice will drive the Description field. The file will be save and an Access table will be update based on a link.
Will to pay $40 for this form.

This is my first Post:
Excel 2007

I am attaching the test work book
I created a pricing tool using multiple worksheets (72)
There are about 5 manufacturers and mutiple models
I need to add the full row (starting with qty)

Each model has multiple accesories
Some accesories are required
Some accesories cannot be added togethor

I created a form that works using only formulas - but would rather use userboxes.

Combo box 1 mfg - point to list on first sheet
Combo box 2 point to list on different sheet (dependant on choice 1)
combo 3 point to the model's sheet

Is there a good tutorial that assumes no beginning VBA skills

Hi I have a workbook, I have attached here with. I have three sheets in this Baseline, reassessment and comparision. A company can have one baseline but they can have more than one reassessments. One sheet Baseline record all information of company for first survey. Sheet re-assessment shows all record of a company for 2nd survey onwards (business name from first coloumn of re-assessment coloumn A). I have two combo boxes in comparision sheet. What I need is---
the first combo box (cboBaseline) will show all names from Baseline>Coloumnn A
The second combo box (cboReass) will show Re-assessment >Start Date (matching value Baseline>Coloumnn A = Re-assessment> Coloumn A )

Combo box (cboBaseline) is working but I could not figure out how to make cboReass work

I currently have two separate combo boxes created by using data validation. The first combo box selects one of 35 divisions of items. The second combo box then only shows the items that fall within the division that is selected in the first combo box.

I'm not sure if I'm using the best method to accomplish that, but it seems to work just fine. What I need to do now is to somehow filter the results that show up in that second combo box by another criteria other than just the division that is selected in the first combo box.

The total amount of data that makes up all 35 divisions is 7,314 rows long. In reality, we will only regularly use a fraction of that data, maybe 200-500 rows on a regular basis. I don't want to delete the rows that we don't normally use, because every once in a while we will want to use that data, just not very often.

What I would like to do is add an additional column to each of my 7,314 rows where I could identify whether or not that row was "preferred", by having that cell contain an "x", "p", or "1", etc. Then I would like to somehow filter the results of my second combo box to either show me "all" results, or just "preferred" results. We would normally filter the results to "preferred", but then when we needed access to an item we don't usually use, it would be available to us by removing the "preferred" filter.

I don't want to make this post too long, but in case you need to know the current methods I'm using, I will explain them below.

My first combo box is based on a data validation list. That list is the first column of a table which contains the names of all 35 divisions. The second column of that table contains the corresponding names for the named ranges to be used for the second combo box. For instance, the named range for Division 01 is SheetName!A2:A255. So when Division 01 is selected in the first combo box, my second combo box displays all the names in SheetName!A2:A255.

I would like to have an option button group or an additional combo box that I could use to further filter the results to show just my "preferred" items. So instead of showing me all 254 names contained withing Division 01, it would show me only those 10-20 names whos "preferred" column have been flagged with an "x", "p", or "1", etc.

It's OK if I need to scrap my current methods and start over in order to accomplish this, so if there is a better way of going about this that the road I'm on, that's perfectly OK. The same goes for my idea of adding that "preferred" column, if there is a better way to somehow "flag", or "tag" a particular row as being "preferred" that's fine.

Thanks, Spence

Using Excel 2007

I have 8 combo-boxes whose list fill range are the same( a list of dates)
i want to limit the range of the 7 other combo boxes based on the date selected in the 1st combo box(say a start date)
the 2 combo box (say end date)should have only values that are greater than the value in the 1st combo box
the other combo boxes should display values only between the start date and end date

plz reply as soon as possible

Good Morning

First let me say that after searching for help in excel vba for some time now , i find myself in this forum reading and enjoying the help that is given. so i have decided to register and ask for help on matters i could not find the answer to.

I do hope that with my first post both the thread title and content are up to par.

My question is as follow:
I have in the worksheet a main frame that holds 2 secondary frames .
1st frame with a calendar and a few command buttons
the 2nd frame have a combo box , a few text boxes and a command button.

The subject i am struggling with is assigning event to the combo box ( change event ) .
Since this frame will hold employee data, i would like the text boxes to be populated with the employee data based on the employee chosen from the list

I have read the " withevent " subject , but i can't seem to get it to work , and was hoping there is an easy way of doing it.
Once i can get the combo box to work , i think/hope i can manage with the rest

Thank you for the time spent to read this
I do hope i am clear with the help i need




I have a bound form with a sub form. The sub form is a datasheet with one field visible and other hidden.

On the main form are two combo boxes (say 1 and 2) and two list boxes (say 3 and 4) with cascading queries, each one altering the records in the subsequent one.

The user selects from the combo boxes and the list boxes and there are events to update the current record in the sub form. This works.

If the user selects a record on the sub form the OnCurrent event occurs and code is run. The code simply determines if there is a value in the current record that could be displayed in combo box 1. If there is it updates combo box 1 and then tries to requery Combo 2 based on combo 1 value. It will then check to see if there is a value in the current record that should be displayed in Combo 2 and select that, and then requery list box 3 and so on.

The problem is that the requery of Combo 2 causes the oncurrent event to run again. This then causes an overflow of some sort and the application quits. Not surprising if the sub keeps calling itself.

But why?

Why should the requery of a parent form combo box cause the sub form oncurrent event to occur? According to Help the requery does not cause a change event, and the code does not go to the change event handlers.

I am bemused.

I will post the code tomorrow if necessary but I have traced this error down to the requery line and checked the call stack and watched it grow as the requery causes the recursive calling.

Any ideas?




Can anyone help me in providing a VBA code for implementing Dependent Combo boxes for instance for Country -> State -> City cascading comboboxes in a User Form

The country ,state,city values can be read from a worksheet.


Hello Everybody,

Relatively new to VBA and I'm having trouble with my user form. I'm attempting to combine two combo box criteria into a command button which will search my database for said criteria and produce corresponding values broken down by category. I've included an example which illustrates how I would like the final form to look and the code I have written so far (I have been successful with creating the two unique value combo boxes). I really just don't understand how to link that information with the command button and then the text box information below it. Can anyone help clarify this? Thank you in advance

Hi all.

I have a combo box with a rowsource from a named range A2:A100 attributed from the combo box properties but i want the combo box to display only the non blank values in the named range, like if I have only 2 items in the combo box the rest of the combo box is blank. Any examples of how to it?

Ty in advance

This seems simple enough, but all the threads I found didn't work they way I wanted.

All I need is when the value in the dropdown/combo box is "Financial Paper" hide only sheet called "Tax" and when value is "Tax Paper" hide only sheet "FS"

How can I do this?


I'm attempting to apply a macro (that worked on a form control combo box ) to an activex combo box. However, I am getting a type 13 mismatch error and I'm not sure how to get the combo box to work correctly. Any help would be greatly appreciated. Here is the macro code for the hide rows that I'm trying to apply to the Activex control:

    Dim Cse As Integer 
    Cse = Sheets("Calculations").Range("b175") 
    Application.ScreenUpdating = 0 
    With Sheets(2) 
        Select Case Cse 
        Case "2" 
            Rows("159:165").EntireRow.Hidden = False 
            Rows("98:104").EntireRow.Hidden = False 
        Case "3" 
            Rows("159:165").EntireRow.Hidden = False 
            Rows("163:165").EntireRow.Hidden = True 
            Rows("98:104").EntireRow.Hidden = False 
            Rows("102:104").EntireRow.Hidden = True 
        Case "3" 
            Rows("159:165").EntireRow.Hidden = False 
            Rows("165:165").EntireRow.Hidden = True 
            Rows("98:104").EntireRow.Hidden = False 
            Rows("104:104").EntireRow.Hidden = True 
        Case "4" 
            Rows("159:165").EntireRow.Hidden = False 
            Rows("164:165").EntireRow.Hidden = True 
            Rows("98:104").EntireRow.Hidden = False 
            Rows("103:104").EntireRow.Hidden = True 
        Case "5" 
            Rows("159:165").EntireRow.Hidden = False 
            Rows("163:165").EntireRow.Hidden = True 
            Rows("98:104").EntireRow.Hidden = False 
            Rows("102:104").EntireRow.Hidden = True 
        Case "6" 
            Rows("159:165").EntireRow.Hidden = False 
            Rows("164:165").EntireRow.Hidden = True 
            Rows("98:104").EntireRow.Hidden = False 
        End Select 
    End With 
    Application.ScreenUpdating = 1 
End Sub 

If you like these VB formatting tags please consider sponsoring the author in support of injured Royal Marines
Even when I changed the "" to text to reflect the index value, it still errored out.

Good day,
Im just new with visual basic and excel, can somebody please help me with my project. I created a foem that it will get the information needed. I have here 3 textboxes, an option button and a combo box.

Help I need:
1. The textboxes, option button and the send button will be disabled until textbox Name is filled trying to hit enter or tab button will show up a message "Name field is Empty". Once textbox Name is filled, hitting enter or tab will enable the next textbox so on and so.

2. At the Option Gender if Male is selected combo box will list "ball, baseball, basketball" if female is selected combo box will list "doll, ribbon, candy".

3. Somebody gave me a code that the datas entered will save the details sheet1, now with send button it will copy the datas in sheet1, create a new excel file and copy those datas into it. The created excel file will also be saved under the same drive where book1 is located.

I hope this is not too much to ask. I also attached the file for you to see.

More power

Looking forward,

Does anyone know how to create a print loop for a combo box that has multiple selections. What I'm trying to do is just have a button that users can press that will print all the possible reports at one time (meaning, they don't have to select each one individually, then print). I have 17 possible selections in the combo box - so you can see how it could be a little cumbersome not to have this functionality. Any help would be appreciated!!

How would I populate a section of cells somewhere else in my workbook based on the the selections made in 3 cascading drop boxes? I have three drop boxes (season, month, holiday): the selection in the first box (season) determines the list that will be available to select from in the second (month), and the selection in the second box (month) determines the list that will be available in the third (holiday). In another section of my workbook, I have a two-part "summary" section that I want populated based on the selections of the drop boxes. If only the first drop box is selected (season), I want the season selected to populate the top part of the summary section, and the options below that season (all the months within it) to populate the lower summary section. If there is a season and a month selected, I want the month selected to populate the top part of the summary section, and the options below the month (all the holidays in that month) to populate the lower section. If there is a season, a month, and a holiday selected, I want the holiday selected to populate the top part of the summary section, and the lower part of the summary section to be blank. I have attached a file with more explanation and an example of how I have it set up. Any help available is greatly appreciated!

Hi All,

My first post on here and recommended by a friend who uses the forum regularly.
I am not very good at coding and have moderate knowledge with in excel, so I am hoping my questions will simple to resolve?

I have searched for an answer for my query but I can not find it anywhere within the forums, so apologies if it is posted elsewhere!

I have created a spreadsheet with numerous validation ranges that I want my team to select from. I have had numerous issues in the past with formatting, incorrect spellings, inconsistent entries which should show the same information etc and it is driving me mad as I need to fix routinely before I can submit it to another department.

I found some code off the internet that will predict based on key entry from a validation source, extend the size of the drop down box by using the combo and disabling pasting through right mouse button or using edit from the main menu.

The problem I find by using the combo box is that the validation will only work if the cursor is not in the box. I know I can change this to double click but I still get the same problem and people are able to type any entry causing me problems elsewhere in the workbook.

I hope this makes sense....and would appreciate any comments, suggestions or help to resolve my issue. Many thanks!!!!

To use autocomplete and set the number of rows to the list I am doing the following to the combo box properties:
Setting ListRows box to 21
Setting MatchEntry to 1-frmMatchEntryComplete

I have added teh following code to the worksheet:

    Dim str As String 
    Dim cboTemp As OLEObject 
    Dim ws As Worksheet 
    Set ws = ActiveSheet 
    On Error Goto errHandler 
    If Target.Count > 1 Then Goto exitHandler 
    Set cboTemp = ws.OLEObjects("ComboBox1") 
    On Error Resume Next 
    If cboTemp.Visible = True Then 
        With cboTemp 
            .Top = 10 
            .Left = 10 
            .ListFillRange = "" 
            .LinkedCell = "" 
            .Visible = False 
            .Value = "" 
        End With 
    End If 
    On Error Goto errHandler 
    If Target.Validation.Type = 3 Then 
         'if the cell contains a data validation list
        Application.EnableEvents = False 
         'get the data validation formula
        str = Target.Validation.Formula1 
        str = Right(str, Len(str) - 1) 
        With cboTemp 
             'show the combobox with the list
            .Visible = True 
            .Left = Target.Left 
            .Top = Target.Top 
            .Width = Target.Width + 15 
            .Height = Target.Height + 5 
            .ListFillRange = ws.Range(str).Address 
            .LinkedCell = Target.Address 
        End With 
    End If 
    Application.ScreenUpdating = True 
    Application.EnableEvents = True 
    Exit Sub 
    Resume exitHandler 
End Sub 

If you like these VB formatting tags please consider sponsoring the author in support of injured Royal Marines
And Optional code to move to next cell if Tab or Enter are pressed

    KeyCode As MSForms.ReturnInteger, _ 
    ByVal Shift As Integer) 
    Select Case KeyCode 
    Case 9 'Tab
        ActiveCell.Offset(0, 1).Activate 
    Case 13 'Enter
        ActiveCell.Offset(1, 0).Activate 
    Case Else 
         'do nothing
    End Select 
End Sub 

If you like these VB formatting tags please consider sponsoring the author in support of injured Royal Marines