How to create combo box in excel

Ibm / Ibm
February 18, 2009 at 03:55:05
Specs: Windows XP, 1 gb
Hi All,
I have to create combo boxes in each cells of 2 columns by using VBA or VB .net
Also I have to write a procedure so that, If something gets selected in combo box of first column, the corresponding values will automatically gets selected in 2nd column combo boxes.
Also can anyone suggest any other way of doing the same.


See More: How to create combo box in excel

Report •

February 20, 2009 at 16:45:46
Use the Excel Help File:

Enter data in a cell from a list you specify

You can create a dropdown list that gets its choices from cells elsewhere on the worksheet.

Type the entries for the dropdown list in a single column or row. Do not include blank cells in the list.
If you type the list on a different worksheet from the data entry cell, define a name for the list.


Select the cell, range of cells, or nonadjacent selections that you want to name.
Click the Name box at the left end of the formula bar .

Name box

Type the name for the cells.
Press ENTER.
Note You cannot name a cell while you are changing the contents of the cell.

If you type the list in a different workbook, define a name with an external reference to the list.


Open the workbook that contains the list of dropdown entries.
Open the workbook where you want to validate cells, point to Name on the Insert menu, and then click Define.
In the Names in workbook box, type the name.
In the Refers to box, delete the contents, and keep the insertion pointer in the box.
On the Window menu, click the name of the workbook that contains the list of dropdown entries, and then click the worksheet that contains the list.
Select the cells containing the list.
In the Define Name dialog box, click Add, and then click Close.
Select the cell where you want the dropdown list.
On the Data menu, click Validation, and then click the Settings tab.
In the Allow box, click List.
If the list is in the same worksheet, enter a reference to your list in the Source box.
If the list is elsewhere, enter the name you defined for your list in the Source box.

Make sure the reference or name is preceded with an equal sign (=).

Make sure the In-cell dropdown check box is selected.
Specify whether the cell can be left blank: Select or clear the Ignore blank check box.
To display optional input instructions when the cell is clicked, click the Input Message tab, make sure the Show input message when cell is selected check box is selected, and then fill in the title and text for the message.
Specify how you want Microsoft Excel to respond when invalid data is entered.

Click the Error Alert tab, and make sure the Show error alert after invalid data is entered check box is selected.

Select one of the following options for the Style box:

To display an information message that does not prevent entry of invalid data, click Information.

To display a warning message that does not prevent entry of invalid data, click Warning.

To prevent entry of invalid data, click Stop.

Fill in the title and text for the message (up to 225 characters).

Note If you don't enter a title or text, the title defaults to " Microsoft Excel" and the message to: "The value you entered is not valid. A user has restricted values that can be entered into this cell."

Note Applying data validation to a cell does not format the cell.

If the entry list is short, you can type the entries directly in the Source box, separated by the Microsoft Windows list separator character (commas by default). For example, you could type Low, Average, High in the Source box instead of entering the three words on a worksheet.

Who in their right mind would ever need more than 640K of RAM!?
Bill Gates, 1981

Report •
Related Solutions

Ask Question