ComboBox

Ben S

Board Regular
Joined
Oct 21, 2002
Messages
124
I have set up a comboBox which allows me to choose 1 of 5 options using the drop down menu.

I would like to use a command button to automatically take me to the relevant section of the worksheet.

E.g if Ao1 was chosen within the comboBox when i click on the command button it will take me directly to range Ao1 within the worksheet.
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.

Andrew Poulsom

MrExcel MVP
Joined
Jul 21, 2002
Messages
73,092
Why don't you do it straight from your ComboBox using the Click or Change event procedure?
 

Ben S

Board Regular
Joined
Oct 21, 2002
Messages
124

ADVERTISEMENT

Its from the control toolbox
 

Ben S

Board Regular
Joined
Oct 21, 2002
Messages
124
There are named ranges

Call them cost1, Cost2, Cost3, cost4 & Cost5
 

Andrew Poulsom

MrExcel MVP
Joined
Jul 21, 2002
Messages
73,092
Activate the Control ToolBox and click the Design icon. Right click your ComboBox and choose View Code. Paste this into the window on the right:

Code:
Private Sub ComboBox1_Change()
    Application.Goto Reference:=ComboBox1.Text
End Sub

Note you should already see the first and last lines, so just add the middle one. The name (ComboBox1) may be different

Press Alt+F11 to return to your worksheet and click the Design icon again.

Now select something from your ComboBox.
 

Forum statistics

Threads
1,144,768
Messages
5,726,181
Members
422,660
Latest member
mrsteele

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
Top