HOW TO SET UP COMBO BOXES

wendell42

Board Regular
Joined
Feb 10, 2005
Messages
137
Greetings to all! I am trying to design a travel voucher form using Excel and I want to put in some combo boxes. I am fairly well versed with Access and combo boxes there, but as I have found out, Excel is a different beast! Here is basically what I want to do:

Put in a combo box for type of travel. Each type of travel is a different ammount of money, so when one type is selected, it will take that ammount and multiply it by the miles (in another cell) and come up with a total.

I have several different areas that I want to be able to do this.

Also, I would like to make it so if a specific radio button is selected, it would make it so another combo box is disabled.

Thanks for any and all your help!

Wendell42
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
Welcome to the board!

Let's say that the travel types and the associated costs are laid out in the range A1:B6 as follows:
Code:
Type	Cost
TypeA	$50.00
TypeB	$60.00
TypeC	$70.00
TypeD	$80.00
TypeE	$90.00
Bring up the Control Toolbox toolbar, and draw a combo box on your sheet. Right click and go to Properties. In the List Fill range field, type in the range A2:B6.

In LinkedCell enter C1.

Then, in the BoundColumn field enter 2.

When you exit Design mode and use your combo box, when you select a travel type the associated cost should appear in cell C1. You can have other formulas calculate the total cost from this value along with the miles value.

On the 2nd problem, draw a new option button on the sheet from the Control Toolbox toolbar. Then, while still in design mode, double click it. This should bring up the VB Editor. You can enter the following code for this option button to disable the combo box ComboBox1 when this option button is selected:

Code:
Private Sub OptionButton1_Change()
    If OptionButton1.Value = True Then
        ComboBox1.Enabled = False
    Else
        ComboBox1.Enabled = True
    End If
End Sub

I hope that gives you enough to go on. Good luck.
 
Upvote 0

Forum statistics

Threads
1,215,219
Messages
6,123,688
Members
449,117
Latest member
Aaagu

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top