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

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
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.
 
Upvote 0
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.
 
Upvote 0

Forum statistics

Threads
1,211,748
Messages
6,103,686
Members
447,877
Latest member
OrangeJuice

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