ComboBox:how to make selection go to cell?

Old dog new tricks

New Member
Joined
Mar 17, 2011
Messages
1
This is my first time using a combo box. This combo box is simply meant to quickly take the user to a particular place in a >4000 row spreadsheet; e.g., click on "Car" in the drop down, then go to cell A407, but nothing is happening. Eventually I would like to search & match to a text string in column A, because the sheet will change and the location won't always be A407, so if that is possible I'd love to know how to do that, too. Thanks ever so much!

Private Sub cboUNITS_Click()
If cboUNITS = "Car" Then
Sheets("Unit Drives and Economics").Select
Range("A407").Select


End If
End Sub
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!

craig.penny

Well-known Member
Joined
May 8, 2009
Messages
656
This is a guess but worth trying:

Code:
[SIZE=1]Private Sub cboUNITS_Click()[/SIZE]
[SIZE=1]
If cboUNITS = "Car" Then
    Sheets("Unit Drives and Economics").Select
    Sheets("Unit Drives and Economics").Range("A407").Select
End If

End Sub[/SIZE]

It may be that you just need to fully qualify the range you want to select.
 

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
76,343
Office Version
  1. 365
Platform
  1. Windows
What type of combobox is it and where is it located?

To goto a specific cell you can use this.
Code:
Application.Goto Sheets("Unit Drives and Economics").Range("A407"), True
How to get that to run depends on the answer to the first question.:)

Comoboboxes either return the value selected or the index (place in list) of the value selected.

eg comboboxes on a worksheet created with the Forms toolbar return the index, not the value.
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,163,563
Messages
5,832,522
Members
430,139
Latest member
mavsfan360

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