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 do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
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.
 
Upvote 0

Forum statistics

Threads
1,213,543
Messages
6,114,240
Members
448,555
Latest member
RobertJones1986

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